TextServerFallback: 2x performance improvement by removing redundant lookups #92581
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
followup to #92575
in total from my benchmark it takes ~38% of the time to render the same text in a Label (~44% in CodeEdit, the main script editor in godot)
benchmark: TextServerTest.zip
benchmark compile flags:
scons target=template_release production=yes optimize=speed lto=full tests=yes deprecated=no scu_build=yes module_text_server_adv_enabled=no module_text_server_fb_enabled=yes
benchmark run command:
./godot/bin/godot.linuxbsd.template_release.x86_64 --disable-vsync ./TextServerTest/project.godot
results before:
after:
the last line of each is the most important, its the average of all frame times (minus some longer startup frames)