Page 1 of 2
Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 3:35 am
by Blue
I just downloaded and installed the much awaited PB 6.10 LTS.
I used it to compile a small app I made which compiles to 237 KB under PB 6.04, but gets inflated to 748 KB under PB 6.10 LTS. It's the exact same source, without a iota of change.
I'd love to understand how and why that happened...
Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 3:58 am
by idle
I just answered in the other thread.
short of it, 6.10 has a new c runtime from visual studio 22, the reason is mostly for security.
Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 4:13 am
by Blue
Thank you, idle.
Very quick reply !
I knew I had seen something related somewhere, but I couldn't find it.
Would you mind pasting a link to the thread you're referring to ?
NEVER MIND !
It finally dawned on me what you meant by "the other thread",
and I read your explanation about the new Universal C Run Time (UCRT) that Fred is now using.
Many thanks for that.
Whatever the explanation, a 3.15 times size increase ias a whopping and surprising increase !!
Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 4:30 am
by idle
Blue wrote: Fri Mar 29, 2024 4:13 am
What does UCRT stand for in Visual Studio 22 UCRT ???
stands for universal c runtime so now the msvcrt.lib is essentially imports or alias to the ucrt.lib
Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 4:33 am
by Blue
idle wrote: Fri Mar 29, 2024 4:30 am
[...]
stands for universal c runtime so now the msvcrt.lib is essentially imports or alias to the ucrt.lib
Yeah, I just looked it up on the Internet. That's why I changed the post where i was asking.
Thanks.
Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 4:35 am
by jacdelad
...for a moment I thought someone did some self talk here. Your avatars look too much like the other one.

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 4:44 am
by idle
jacdelad wrote: Fri Mar 29, 2024 4:35 am
...for a moment I thought someone did some self talk here. Your avatars look too much like the other one.
omg blues in my head!

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 10:44 am
by BarryG
Blue wrote: Fri Mar 29, 2024 4:13 amWhatever the explanation, a 3.15 times size increase ias a whopping and surprising increase !!
So don't compile it with 6.10, since you said your source hasn't changed one iota. Why recompile if it's not going to benefit from any 6.10 features?
Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 2:31 pm
by jacdelad
BarryG wrote: Fri Mar 29, 2024 10:44 am
So don't compile it with 6.10, since you said your source hasn't changed one iota. Why recompile if it's not going to benefit from any 6.10 features?
It still may benefit from the bugfixes.
Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 5:05 pm
by Blue
BarryG wrote: Fri Mar 29, 2024 10:44 am
[...]
So don't compile it with 6.10, since you said your source hasn't changed one iota. Why recompile if it's not going to benefit from any 6.10 features?
You're missing the point.
I recompiled specifically for the purpose of COMPARiNG the outputs.
Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 6:44 pm
by PBJim
Blue wrote: Fri Mar 29, 2024 5:05 pm
BarryG wrote: Fri Mar 29, 2024 10:44 am
[...]
So don't compile it with 6.10, since you said your source hasn't changed one iota. Why recompile if it's not going to benefit from any 6.10 features?
You're missing the point.
I recompiled specifically for the purpose of COMPARiNG the outputs.
I obtained similar results as yours Blue, done for the same reason, just as a comparison. I was hoping that the increase in percentage terms would be less significant than your findings, or rather that the additional overhead with 6.10 would be smaller in relation to my overall application size.
Code: Select all
Purpose Source size PB 6.00 PB 6.10 Incr.
Server-side network service 471 KB, 9,500 lines 323 KB 893 KB x 2.76
Network client 176 KB, 3,200 lines 224 KB 732 KB x 3.27
Edited — improved what I was trying to say

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 6:50 pm
by Quin
Does it really matter though?
Most executables I've seen from even PB 6.10 are under 1 MB, even smaller if you run them through UPX. Is this simply curiosity, or does it truly matter for some reason? 1 MB is quite good, even for like 10 years ago standards.
Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 7:07 pm
by Fred
If you own Visual Studio 2022, you can put link.exe and it's dependencies in the Purebasic/Compilers/VC/ directory (just create it) and you should have a bit smaller exe.
Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 8:27 pm
by skywalk
I just made a ~35k LOC app with both link's.
Almost 25% smaller with VS2022 Link. Not noticeable given 3.1MB to 2.4MB.
I'm more interested in consistent flow of tooling.
Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04
Posted: Fri Mar 29, 2024 9:53 pm
by Quin
Fred wrote: Fri Mar 29, 2024 7:07 pm
If you own Visual Studio 2022, you can put link.exe and it's dependencies in the Purebasic/Compilers/VC/ directory (just create it) and you should have a bit smaller exe.
hmm, weird, it's already there for me and I never added it as far as I know.

maybe it got included in one of the beta releases?