Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

When is compilation ("BatComp") worthwhile?

I thought I would look into batch-file compilation (I have written over 100 batch files since first getting 4NT many years ago), so I compiled all of my batch files in a "For" loop. While I got some messages essentially saying that the .BAT file was "too small" for compilation to be worthwhile, I noticed that all of the original .BAT files also each fit into a single cluster (4K) on the hard-drive, as do (of course) the corresponding ".BTM" files. This being the case, is it really worthwhile to compile .BAT files that fit into a single cluster? While I don't imagine there'll be an improvement in "load" time (a single cluster is the smallest unit of disk-drive I/O), there might be an advantage in terms of batch-file "parse" time. (And I have to ask - how many people write .BAT files that are larger than 4K? I certainly don't, and since the batch file language is now essentially what (used to be) called a "high-level language" I am writing some pretty large (but less than 4K! ; > ) batch files. (I am a C++ programmer by trade, and batch files are certainly much easier to write to do DOS things than are C++ programs!)
 
Re: When is compilation ("BatComp") worthwhile?

While I got some messages essentially saying that the .BAT file was "too small" for compilation to be worthwhile, I noticed that all of the original .BAT files also each fit into a single cluster (4K) on the hard-drive, as do (of course) the corresponding ".BTM" files. This being the case, is it really worthwhile to compile .BAT files that fit into a single cluster?

BATCOMP isn't a compiler, it's a compressor.

Yes, batch files do sometimes grow large enough to make compression worthwhile, but I think the major advantage is obfuscation. If you have a batch file containing e.g. passwords, compressing it with BATCOMP and using the /E option will make them far less obvious to the casual user.
 
BATCOMP stands for "batch compressor", not "batch compiler".

It's purpose is to prevent end users from modifying (deliberately or
inadvertently) batch files, not to make them faster or (significantly)
smaller. This was requested by some IT departments that wanted to
distribute batch files but were afraid of their smartest (& dumbest?) users
rewriting them.

And yes, I know of some TCC users who have some *very* large batch files!

Rex Conn
JP Software
 
BATCOMP stands for "batch compressor", not "batch compiler".

It's purpose is to prevent end users from modifying (deliberately or
inadvertently) batch files, not to make them faster or (significantly)
smaller. This was requested by some IT departments that wanted to
distribute batch files but were afraid of their smartest (& dumbest?) users
rewriting them.

And yes, I know of some TCC users who have some *very* large batch files!

Rex Conn
JP Software

Thanks, Rex. My mistake! ; > ) (Althought I do sort of wonder when/why/how that happened...)
 
Back
Top
[FOX] Ultimate Translator
Translate