Skip to content
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

Cache all component paths from the code into @onready variables #14

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

pcbeard
Copy link
Contributor

@pcbeard pcbeard commented Jan 6, 2024

Each use of a $ component path is a call to get_node(), so caching these up front should speed things up.

Each use of a $ component path is a call to get_node(), so caching
these up front should speed things up.
Copy link
Owner

@Phazorknight Phazorknight left a comment

Choose a reason for hiding this comment

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

Thank you!
Will bring this into main, though I'll probably update it a bit to fit GDscript naming conventions (mostly using snake case instead of camel case).

@Phazorknight Phazorknight merged commit f616c3e into Phazorknight:main Jan 6, 2024
@pcbeard pcbeard deleted the CacheAllComponents branch January 7, 2024 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants