[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make your non-stripped DLLs 75% smaller under NT!!!
I apologize for the cross-post but this is too important for anyone to miss. We just discovered something that dropped a pre-stripped DLL from 50MB to <13MB under WebObjects/OpenStep for NT.
We had created framework headers (ex: NSFoundation.h) for all of our frameworks. We would then include these as opposed to actual classes. Under Mach this combined with pre-compiled headers results in a quicker compile. Under NT pre-compiled headers do not work, but at least you don't have to include each and every header.
What we discovered is that every time we imported a framework header the un-stripped DLL/exe that imported that header grew by a huge amount. By going through and removing all imports of framework headers, and importing specific classes explicitly, we achieved the above ~75% decrease in one of our frameworks and similar decreases in the others.
We are not certain, but we don't believe this is true when importing Apple's framework headers. We believe this is because their headers are stripped, and ours are un-stripped, so the full symbol rich version is being imported.
I don't know how many people are using framework headers, but if you are you can save yourselves much pain. Obviously this size decrease speeds up compiles and application loading, particularly in gdb.
I hope many people can be saved this pain.
-Mont