-
Notifications
You must be signed in to change notification settings - Fork 0
⚡ Optimize RemapPanel redundant InputRouter node lookups #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
niyazmft
merged 5 commits into
main
from
perf/optimize-remap-panel-lookups-11320102254896643776
Jun 2, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b39f6de
⚡ Optimize RemapPanel redundant InputRouter node lookups
google-labs-jules[bot] a9c06cd
Merge branch 'main' into perf/optimize-remap-panel-lookups-1132010225…
niyazmft e006249
⚡ Optimize RemapPanel redundant InputRouter node lookups
google-labs-jules[bot] 9cd1de2
⚡ Optimize RemapPanel redundant InputRouter node lookups
google-labs-jules[bot] 8b30632
Merge branch 'main' into perf/optimize-remap-panel-lookups-1132010225…
niyazmft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| extends SceneTree | ||
|
|
||
|
|
||
| func _initialize() -> void: | ||
| var script: GDScript = load("res://scripts/ui/remap_panel.gd") as GDScript | ||
| var panel: Node = script.new() | ||
|
|
||
| root.add_child(panel) | ||
|
|
||
| var panel_vbox: VBoxContainer = VBoxContainer.new() | ||
| panel_vbox.name = "VBoxContainer" | ||
| var panel_scroll: ScrollContainer = ScrollContainer.new() | ||
| panel_scroll.name = "ScrollContainer" | ||
| var action_list: VBoxContainer = VBoxContainer.new() | ||
| action_list.name = "ActionList" | ||
| panel_scroll.add_child(action_list) | ||
| panel_vbox.add_child(panel_scroll) | ||
| panel.add_child(panel_vbox) | ||
|
|
||
| var toast: Label = Label.new() | ||
| toast.name = "ConflictToast" | ||
| panel.add_child(toast) | ||
|
|
||
| # add fake actions | ||
| for i: int in range(100): | ||
| var action_name: StringName = "bench_action_" + str(i) | ||
| if not InputMap.has_action(action_name): | ||
| InputMap.add_action(action_name) | ||
| var ev: InputEventKey = InputEventKey.new() | ||
| ev.keycode = KEY_SPACE | ||
| InputMap.action_add_event(action_name, ev) | ||
|
|
||
| var start: int = Time.get_ticks_usec() | ||
| for i: int in range(1000): | ||
| for a: StringName in InputMap.get_actions(): | ||
| panel.call("get_action_text", a) | ||
| panel.call("get_action_icon", a) | ||
|
|
||
| var end: int = Time.get_ticks_usec() | ||
| print("Benchmark execution time: ", end - start, " us") | ||
|
|
||
| quit() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.