Open gokiburikin opened 1 year ago
I would say it's expected behavior, threaded mode is intended for processing large amounts of text and displays the current state, so if the text is replaced faster than it's processed it will show nothing or partial text. There's no reason to enable it for something like this demo, it's only useful if you have a lot of static text or constantly adding new text (e.g., a log window and help pages in the editor).
I would say it's expected behavior, threaded mode is intended for processing large amounts of text and displays the current state, so if the text is replaced faster than it's processed it will show nothing or partial text.
Could we replace the displayed text while rendering only if it's longer than the previous fully rendered text? (Of course, if the final text is shorter, it should be displayed in place of the previously longer text.)
I would say it's expected behavior, threaded mode is intended for processing large amounts of text...There's no reason to enable it for something like this demo
That's fair. I only considered using it because the performance of setting RTL text seems to have gone down a decent amount in Godot 4.1 compared to Godot 3.5. About 45% from my simple timing tests. This turned out to not be true. Setting text is not much slower, uncached text rendering is, likely due to a bug that has been addressed.
Took some digging but I found out that the root cause of this issue may have already been addressed by this pr. https://github.com/godotengine/godot/pull/77280
I'm leaving the rest of the post in place below the fold, but it's very likely the issue that caused me to look into threading in the first place has been addressed, so changes likely wouldn't be necessary.
I'm encountering this bug while trying to fix https://github.com/godotengine/godot/issues/84718 . Essentially, I'm trying to put a line limit on the Output Log (which uses RichTextLabel). Normally, you can flood messages to the Output log and it'll display them fine. However, I added a line limit that would trigger "remove_paragraph" to remove lines from the start of the Output log when it went past the limit. The moment this feature is activated, the log flickers/goes blank so badly you can't read it until you stop flooding the log with messages. Obviously for a log, you want to be able to keep up with quickly delivered messages, even if just a glimpse. You definitely don't want to get the idea that there aren't any messages when in fact there are a lot.
Godot version
v4.1.stable.official [970459615]
System information
Windows 10 - Vulkan (Forward+) - GTX 970 - i7-10700K
Issue description
Enabling threading on RichTextLabel causes it to flicker when you update its text property.
At first I thought this was only when BBCode was enabled but when making the MRP it turned out to be any text update. If you change text once a frame the text functionally disappears.
Also happens in v4.2.dev3.official [013e8e3af].
Steps to reproduce
Enable threading on RichTextLabel and change its text. MRP attached.
A visual example (flashing lights warning):
https://github.com/godotengine/godot/assets/3820082/d81b2732-07b3-435e-a9dd-58d96484694c
Minimal reproduction project
rtl-threading-mrp.zip