X Tutup
Skip to content

Remove unused parameter in __constant_get_enum_name/__constant_get_bitfield_name#110206

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
aaronp64:remove_unused_enum_bitfield_param
Sep 17, 2025
Merged

Remove unused parameter in __constant_get_enum_name/__constant_get_bitfield_name#110206
Repiteo merged 1 commit intogodotengine:masterfrom
aaronp64:remove_unused_enum_bitfield_param

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.

@Repiteo Repiteo modified the milestones: 4.x, 4.6 Sep 10, 2025
@Repiteo Repiteo merged commit 1a89648 into godotengine:master Sep 17, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Sep 17, 2025

Thanks!

ProfessorOctopus pushed a commit to ProfessorOctopus/godot that referenced this pull request Sep 17, 2025
…m_bitfield_param

Remove unused parameter in `__constant_get_enum_name`/`__constant_get_bitfield_name`
@aaronp64 aaronp64 deleted the remove_unused_enum_bitfield_param branch September 17, 2025 14:38
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.

3 participants

X Tutup