this post was submitted on 11 Mar 2025
85 points (100.0% liked)

Godot

6474 readers
5 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

[email protected]

Credits

founded 2 years ago
MODERATORS
 

This was a fun one. Here's my newest post on how to dramatically reduce Godot's build size.

Some sacrifices were made... But the end result is a Godot project that works exactly the same, albeit with slightly worse performance. Hope this can help others in achieving tiny build sizes!

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 11 points 1 week ago (2 children)

Some sacrifices were made... But the end result is a Godot project that works exactly the same, albeit with slightly worse performance.

The write up has lots of hard numbers for the executable size but only describes the performance impact in general terms.

It would be good to see some before and after performance numbers.

[–] [email protected] 7 points 1 week ago (1 children)

Performance testing is a whole can of worms. It's hard to get an idea of how performance changes because it'll depend a lot on the nodes and scripts being used. There could be huge regressions in specific cases and functions and no difference in others. Usually you'll need a suite of tests to see what changed.

[–] [email protected] 2 points 1 week ago* (last edited 1 week ago)

Similar but slightly different reply to Kelly's, not really responding to your comment on testing viability (though I don't feel like this comment should be a top-level comment).

It seems to me that at least for opt=size, it actually did improve performance (for a basic benchmark at least) somewhat for low cost compared to no flags. I'm sure this is not as fast as opt=speed, but I would call that more of a trade-off than a sacrifice especially when also considering compilation-time to get a measure of efficiency.

At least that was my impression with Clang (which I was seeing size-optimized Clang giving decent performance but half the compilation time of default GCC). An efficient middle-ground.

EDIT: Though this was also for code (via bindings) not Godot/exports themselves, so it could be different (though I'm not sure why unless a difference of defaults).