Skip to content

Conversation

aaronp64
Copy link
Contributor

@aaronp64 aaronp64 commented Sep 2, 2025

Removed unused String parameter in __constant_get_enum_name() and __constant_get_bitfield_name() to avoid creating/destroying extra Strings. Reduces binary size by ~300 KB.

…tfield_name

Removed unused String parameter in __constant_get_enum_name() and __constant_get_bitfield_name() to avoid creating/destroying extra Strings.
@aaronp64 aaronp64 requested a review from a team as a code owner September 2, 2025 19:06
@Calinou Calinou added this to the 4.x milestone Sep 2, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on a few projects, it works as expected. Code looks good to me.

Binary size (Linux x86_64 release export template with LTO enabled):

  • Before: 71,480,352 bytes
  • After: 71,287,968 bytes (-192 kB)

Android release APK:

  • Before: 73,539,379 bytes
  • After: 73,119,011 bytes (-420 kB)

Web release WASM:

  • Before: 47,410,554 bytes
  • After: 46,930,399 bytes (-480 kB)

Web release WASM gzipped (default level):

  • Before: 10,563,664 bytes
  • After: 10,534,333 bytes (-29 kB)

The decrease in binary size should be more significant on editor builds, given it has more bindings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants