Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Just starting out? Need help? Post your questions and find answers here.
User avatar
Blue
Addict
Addict
Posts: 972
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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...
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
User avatar
idle
Always Here
Always Here
Posts: 6031
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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.
User avatar
Blue
Addict
Addict
Posts: 972
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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 !!
Last edited by Blue on Fri Mar 29, 2024 4:31 am, edited 1 time in total.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
User avatar
idle
Always Here
Always Here
Posts: 6031
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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
User avatar
Blue
Addict
Addict
Posts: 972
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
User avatar
jacdelad
Addict
Addict
Posts: 2032
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post by jacdelad »

...for a moment I thought someone did some self talk here. Your avatars look too much like the other one. :mrgreen:
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
idle
Always Here
Always Here
Posts: 6031
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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. :mrgreen:
omg blues in my head! :lol:
BarryG
Addict
Addict
Posts: 4219
Joined: Thu Apr 18, 2019 8:17 am

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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?
User avatar
jacdelad
Addict
Addict
Posts: 2032
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
Blue
Addict
Addict
Posts: 972
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
PBJim
Enthusiast
Enthusiast
Posts: 296
Joined: Fri Jan 19, 2024 11:56 pm

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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 :?
Last edited by PBJim on Fri Mar 29, 2024 10:02 pm, edited 1 time in total.
Quin
Addict
Addict
Posts: 1135
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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.
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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.
User avatar
skywalk
Addict
Addict
Posts: 4242
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Quin
Addict
Addict
Posts: 1135
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: Small exe 3.15 times bigger in PB 6.10 than in PB 6.04

Post 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?
Post Reply