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

[3.x] GDScriptParser: Don't use index operator on linked list #74782

Merged
merged 1 commit into from
Mar 12, 2023

Conversation

lawnjelly
Copy link
Member

Index operators are super slow with linked lists. This came up in profiling the parsing, iterating sequentially using iterator is much faster.

Helps fix #74733.

Notes

  • This fixes one of the bottlenecks in parsing but there are more.

Index operators are super slow with linked lists. This came up in profiling the parsing, iterating sequentially using iterator is much faster.
@lawnjelly lawnjelly requested a review from a team as a code owner March 11, 2023 17:08
@lawnjelly lawnjelly changed the title GDScriptParser - don't use index operator on linked list [3.x] GDScriptParser - don't use index operator on linked list Mar 11, 2023
@lawnjelly lawnjelly added this to the 3.6 milestone Mar 11, 2023
@lawnjelly lawnjelly added the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Mar 11, 2023
@akien-mga akien-mga merged commit 1a4bcad into godotengine:3.x Mar 12, 2023
@akien-mga
Copy link
Member

Thanks!

@lawnjelly lawnjelly deleted the gdscriptparser_linkedlist branch March 12, 2023 14:56
@akien-mga akien-mga changed the title [3.x] GDScriptParser - don't use index operator on linked list [3.x] GDScriptParser: Don't use index operator on linked list Aug 18, 2023
@akien-mga
Copy link
Member

Cherry-picked for 3.5.3.

@akien-mga akien-mga removed the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Aug 18, 2023
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.

3 participants