Skip to content

GDType: Consolidate integer constants in property map - #122727

Open
DeeJayLSP wants to merge 1 commit into
godotengine:masterfrom
DeeJayLSP:gdtype-no-integer-constant-map
Open

GDType: Consolidate integer constants in property map#122727
DeeJayLSP wants to merge 1 commit into
godotengine:masterfrom
DeeJayLSP:gdtype-no-integer-constant-map

Conversation

@DeeJayLSP

@DeeJayLSP DeeJayLSP commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

What problem(s) does this PR solve?

#112596 introduced property maps in GDType, which made integer constants exist both in a dedicated integer constant map and the property map.

Like how it's done with setgets, it should be possible to get the property map, validate that the type is integer constant, then get the integer from its payload.

Memory usage test

  • Build command: scons target=editor linker=mold dev_build=yes optimize=debug debug_symbols=yes werror=yes tests=yes

Test script:

extends Node

func _ready():
	print(OS.get_static_memory_usage())
	await get_tree().process_frame
	get_tree().quit()

On a simple project that just prints OS.get_static_memory_usage() then quits, I got the following from running in headless mode:

Build Memory usage (bytes)
master 88894464
PR 86315132

Effectively a reduction of 2.46 MiB.

Additional information

The aforementioned PR mentions the new maps added over 20MB in RAM usage. This is just my attempt to mitigate part of it, but it could be superseded as soon as someone comes with a better/bigger solution to the problem.

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