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

[TextServer] Fix long selection performance. #60136

Merged
merged 1 commit into from Apr 11, 2022

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Apr 11, 2022

Fixes #60107

Nested loop is not necessary since selection ranges are calculated sequentially, and merge can be done in place. And it seems to be incorrectly rebased at some point, adding a useless loop.

Selection, Ctrl+A, or cursor movement on million chars long text in the LineEdit should be instant, pasting it and doing any edit takes about two seconds (which is expected). With text that long, carets/selection are shifted (I'll take a look, but it's probably just limitation of Vector2 precision limitation).

@akien-mga akien-mga merged commit b80a6ab into godotengine:master Apr 11, 2022
@akien-mga
Copy link
Member

Thanks!

@bruvzg bruvzg deleted the long_select branch April 11, 2022 12:44
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.

Very long text in LineEdit causes Godot not responding
2 participants