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

RTL: Improve performance by using list iterators for item/paragraph removal #80857

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Aug 21, 2023

Use proper List iterators instead of indices for subitems and iterate only over relevant sub-set of the items, should improve performance with large number of lines (but we probably should not use List at all, so it's a temporary fix).

Fixes #76144

@bruvzg
Copy link
Member Author

bruvzg commented Aug 21, 2023

Before (editor is not usable in about 50 sec and 7K messages, remove_item is the heaviest function):
Screenshot 2023-08-21 at 20 10 53

After (no visible slowdown after 20 min and 7.8M messages, nothing RTL related in the heaviest function list):
Screenshot 2023-08-21 at 20 02 05

@Calinou Calinou added the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Aug 21, 2023
@bruvzg bruvzg marked this pull request as ready for review August 22, 2023 11:30
@bruvzg bruvzg requested a review from a team as a code owner August 22, 2023 11:30
@bruvzg bruvzg marked this pull request as draft August 25, 2023 14:10
@bruvzg bruvzg marked this pull request as ready for review August 25, 2023 14:57
Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

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

I think I can follow the logic here and it LGTM.

@YuriSizov YuriSizov merged commit ffdb466 into godotengine:master Aug 25, 2023
@YuriSizov
Copy link
Contributor

Thanks!

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Sep 21, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.2.

@YuriSizov YuriSizov changed the title [RTL] Use list iterators for item/paragraph removal. RTL: Improve performance by using list iterators for item/paragraph removal Sep 21, 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.

Extreme editor slowdown when using "Collapse Lines" with many different lines.
3 participants