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

Fix unnecessary break when calculating the height of visible lines #77280

Merged

Conversation

Rindbee
Copy link
Contributor

@Rindbee Rindbee commented May 20, 2023

This break causes the minsize to be smaller than expected, and then the size keeps increasing by one line to cover all visible lines. This can cause performance issues when there are many visible lines.

Fix #77268.

This break causes the minsize to be smaller than expected, and then
the size keeps increasing by one line to cover all visible lines.
This can cause performance issues when there are many visible lines.
@Rindbee Rindbee requested a review from a team as a code owner May 20, 2023 15:06
@bruvzg bruvzg self-requested a review May 20, 2023 15:07
@Calinou Calinou added this to the 4.1 milestone May 20, 2023
@Rindbee

This comment was marked as resolved.

@Calinou
Copy link
Member

Calinou commented Jun 18, 2023

Tested locally (rebased against master a83eb16), it works.

With a debug editor build (optimize=none):

  • master: It takes 18.99 seconds for time godot --path ~/Downloads/Godot4LargeLabel/ --quit to run.
  • This PR: It takes 1.54 seconds for time godot --path ~/Downloads/Godot4LargeLabel/ --quit to run.

@akien-mga
Copy link
Member

CC @bruvzg

@akien-mga akien-mga modified the milestones: 4.1, 4.2 Jun 23, 2023
@akien-mga akien-mga added cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release and removed cherrypick:4.0 labels Jun 23, 2023
rsubtil added a commit to retrohub-org/godot that referenced this pull request Jul 24, 2023
@akien-mga akien-mga merged commit b156e24 into godotengine:master Aug 2, 2023
13 checks passed
@akien-mga
Copy link
Member

Thanks!

@Rindbee Rindbee deleted the fix-unnecessary-break-in-Label branch August 2, 2023 11:11
rsubtil added a commit to retrohub-org/godot that referenced this pull request Aug 4, 2023
@akien-mga
Copy link
Member

Note for @YuriSizov: If we want to cherry-pick this for 4.1.x (which may be good given that it fixes a significant performance issue), we need to handle #80218 there too. Your diff in #80218 (comment) might be suitable?

@YuriSizov
Copy link
Contributor

@akien-mga Unfortunately that diff can only be used as a reference. In 4.1 we would need to give min sizes to labels in each validation form individually. The principle would be the same, just a bit more laborious.

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Jan 23, 2024
@YuriSizov
Copy link
Contributor

Given that we can trace various sizing issues to this PR, I wouldn't go for cherry-picking it into 4.1. If we were to do this, we would need to port all follow-up fixes as well, which seems more effort than it's worth at this point.

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.

Labels with lots of text very slow in Godot 4
5 participants