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

Optimalization #295

Merged
merged 6 commits into from
Nov 22, 2024
Merged

Optimalization #295

merged 6 commits into from
Nov 22, 2024

Conversation

fadam87
Copy link
Contributor

@fadam87 fadam87 commented Nov 13, 2024

Optimized findChildrenByComponent and findChildrenByTag methods to avoid creating a new array on each call. Now, if a pre-existing array is provided, results are added to it, reducing object creation and improving performance.

Add

  • findChildrenByComponent(Component.Type, Array) and
  • findChildrenByTag(String, Array) methods into GameObject file

…oid creating a new array on each call. Now, if a pre-existing array is provided, results are added to it, reducing object creation and improving performance.
…oid creating a new array on each call. Now, if a pre-existing array is provided, results are added to it, reducing object creation and improving performance.
Copy link
Owner

@JamesTKhan JamesTKhan left a comment

Choose a reason for hiding this comment

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

Looks useful, thank you!

@JamesTKhan JamesTKhan merged commit d4e8cea into JamesTKhan:master Nov 22, 2024
1 check passed
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