-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Extreme editor slowdown when using "Collapse Lines" with many different lines. #76144
Comments
Confirming I saw performance issues with Collapse Lines on. They went away when I toggled it off. (I do a lot of printing to output to debug AI things) |
It's because changing the last line causes the whole RichTextLabel to be rebuilt. |
What's wrong is RichTextLabel has to rebuild the whole text, as there's no way to just erase the last line to update the count on it. A potential workaround is to have two RichTextLabels, one for the last line and another for everything else. But this ugly solution requires some serious "glue" to work with functionalities like filtering. |
After #77973 it should change only the last line. |
But remove item and remove paragraph code is iterating all subitems List each time, which might be the reason for slowdown as well. |
Godot version
4.0.2
System information
Ubuntu 22.04.1 LTS
Issue description
When "Collapse Lines" in the output dock is enabled, having a lot of different lines in the output makes the editor extremely slow / unusable when trying to add new lines.
This has frozen Godot many times for me when I'm using tool scripts, as every time I get spammed with warnings and errors, the editor quickly becomes unusable, even if my output dock is closed.
Steps to reproduce
Enable the Collapse Lines functionality. Then add this script to a node:
You can close the scene, clear the output, and reopen it to restart the test or after adjusting the number of unique lines to be added initially. For me, the editor becomes unusable at around 2000 different lines and pretty much frozen at around 8000 different lines. This problem is completely absent without the Collapse Lines functionality.
Minimal reproduction project
I provided a script
The text was updated successfully, but these errors were encountered: