Closed leonkrause closed 4 years ago
Both are from thirdparty components, we should try to get changes done upstream in priority (we can patch our copies in parallel as long as we keep track of changes with actual patch files):
Have you tried optimizing for size with -Os and replacing force-inlines with ordinary inline?
At least this is what I'd do as a first step if binary size is a concern for some reason.
This is about dealing with single overly large functions. -Os
affects the whole code base, that's not the goal here (though we should evaluate usage of -Os
or -Oz
for HTML5 builds).
I don't understand how size can be concern for certain functions while not for others
-Os can be specified for per-file BTW (by overriding optimization option) after isolate those functions in a file, it doesn't have to affect the whole code base
Should we keep hq2x_resize
, since we have a vector-based theme now? (Games still use the old image-based theme, but hiDPI isn't used there by default.)
https://en.wikipedia.org/wiki/Hqx
This is very important to the engine isn't it? Especially for pixel games?
Closing as HQ2X was removed, and for PCRE2, I'm not sure what we could do.
Godot has at least 2 functions that are very big when compiled:
match()
from PCRE2hq2x_resize
(which inlines the localisDifferent()
almost 200 times)This increases the size of our binaries, so we should see what we can do about these. The code base should also be checked for more huge functions.