Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does commented code really affect size of .exe?
Message
From
05/02/2011 01:51:46
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
 
 
To
04/02/2011 09:11:03
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01498562
Message ID:
01498863
Views:
94
>>>>It might depend upon how you compile the app too. With project open and having focus, from main menu select Project / Project Info. From the popup window that appears the first tab (project) has 3 checkboxes - debug info, encryped, and attach icon. I THINK if you deselect 'debug info' that the comments are not compiled into the .exe, thus making it smaller.
>>>
>>>I agree with you that the check box "debug" (unchecked) will reduce the size of the .EXE. But I think that the commented code still affects the size. Since, if I am not mistaken, at build time the entire .VC? files are added to the .EXE. And since commented code makes the memo field larger and therefore the .VCT file larger it will increase the size of the .EXE. This is how I think it works. But I am not sure.
>>
>>AFAIR the source is deleted from the memo field copy added into the exe if debug info is excluded, so the comments are gone as well from the exe.
>
>That's only for prg files inside the exe, because executable contains only fxp versions. For scx/vcx stuff, look at your executable as text, and you'll see all of your code, comments included.

Nope. Verified with vfp9sp2, changed project options (see bold part above), recompile all and created app in totalcommander-viewer vs previosly compiled app.

>
>There's a way to do this - remove all the code (use vcx/replace all methods with ""/pack memo) and build with that (and do that in a set of directories where you'll do this on a copy), and then you'll still have the bloat, but minimized - only your properties and binary memos are in. But then you lose debug info by default - i.e. you may get the stack, but without line numbers, and of course no content of the offending line.

not sure if compile of vcx does not trigger pack as well - at least one of the build GUI actions does...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform