Reading personal experiences on trimming the sizes of Delphi executables, I often encounter stories like this one:

I've moved from Delphi 2007 to Delphi XE3 and my executable went from 3Mb to 18Mb! I did this thing and that thing and disabled RTTI and set these flags and got the executable down to 16Mb. Nice, but not enough.
Then I discovered UPX and it reduced the size to 3.5Mb! UPX is magic!!

This is obviously wrong, it should make anyone with half a pint of a sense cringe - but why is it wrong? They got their size down. That's what they wanted.

And then I figured:
Well, you got it down to 3Mb. Can you repeat that?

If Delphi XE8 comes out and your executable is suddenly 17Mb again, what are you going to do to trim it back? If you had spent several hours more and actually understood what happened and how to unhappen that, then you'd still be on a fair footing with the circumstances. Your trump card of using UPX and being excited would still be with you. And now it isn't.

@темы: In English, Компьютеры

Комментарии
31.10.2013 в 19:22

Так почему действительно растёт размер файла? Вообще, для начала надо убедиться, что у товарища а) не сменилась динамическая линковка на статическую б) что версия без отладочной информации не сменилась на версию с ней. Однако скорее всего ни то ни другое не произошло. ВЦЛ-ные библиотеки просто большие.
Да, УПКС я хотел рекомендовать, когда начал чтение, т.к. он традиционно хорошо жмёт делфи-программы.
01.11.2013 в 01:08

zHz00, it's mostly excessive RTTI enabled by default and Delphi sucking at being compact. There were several major points in Delphi history when the size of the executable jumped up; one is when they switched to UTF16 strings (x2 size of all strings), another one when compiling as 64 bit. But it's also just them being lazy and programmers adding all kinds of shit to uses clause without a care in the world.

For instance, original Wakan was 2.3Mb in size; modern one shot up to 3.7 (unicode strings + modern runtime) and then slowly crept its way up to 4.3 Mb due to addition of 7zip wrapper.

Расширенная форма

Редактировать

Подписаться на новые комментарии