Trick to Optimize Winbatch Execution over a Network
Keywords: optimization speed faster Networks Dialup Optimizations
Question:
Many users have a dial-up networking link to a server. When trying to run WinBatch scripts over this rather slow dialup link, the download of the Winbatch EXE and DLLs takes forever. Are there any optimizations for this?Answer:
There are several different techniques. Also read Article through W13170 for optimization issues.
Having a large-model WinBatch EXE on the server is worst, as the entire EXE is transferred to the users memory, and most of it is not used, as it accesses the server for the DLLS. Making small-model exe's helps a lot.
Once you make small model EXEs, it can be noted the EXE's are much smaller. The time consuming portion is the DLL transfer to the user's machine. If the users machine can be pre-loaded with the DLLs (and they do not exist in on the server), the small EXEs downloaded from the server will use the local copy of the DLLs, and vastly speed up the transfers.
The problem here is that if you update your version of the compiler, often you have to figure out how to get the latest versions of the DLLs to the user.
- Another very fast technique is to use the compiler to make a WBCRUNNER.EXE
The compiler can produce "WBC" files out of "WBT" files suitable for being called from a compiled script. Compile the following program as WBCRUNNER.EXE:
and install the resulting EXE (and any required DLLs) on the user machines. Then take your regular script and using the ENCODE compiler option make a WBC file.CALL(param1,"")Now, for the user to run it, say in a login script, add the following line to your login script
In this version the big files - the WBCRUNNER.EXE and the DLLS - are already resident - but brainless - on the user PC, and all that is downloaded to the user is a rather tidy and small WBC file.START /W c:\runtimes\WBCRUNNER.EXE \\server\someplace\yourscript.wbc
Article ID: W14405Filename: Trick to Optimize Winbatch Execution.txt