Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does commented code really affect size of .exe?
Message
From
04/02/2011 09:11:03
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
04/02/2011 08:08:28
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01498562
Message ID:
01498718
Views:
75
>>>>Hi,
>>>>
>>>>I wonder if a commented code adds to the size of the .EXE? My guess is that since the commented code increases the size of the .VCT file (of the class library where the code resides) it has to affect the .EXE; that is, it has to increase its size. Does it make sense?
>>>
>>>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.

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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform