You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is Happening:
Everything works great with the default language English. FPS starts to plummet when changing the language to Hebrew (RTL) using Unity's slider.
Now whenever the user interacts with any RTLTextMeshProUGUI (without changing the text), UI stutters.
It looks like the canvas is being rebuilt for no reason..
What is Expected:
Text is being rebuilt only once and scripts should be optimized at least a bit.
Extra Details:
Consider the profiler screenshot below:
(green) is where current language is the default - English.
(red) is where the user changed to Hebrew (RTL).
(yellow) is 4 interactions with 2 RTLTextMeshProUGUI components. that means simply selecting them back and forth using the arrow keys.
(pink) is what eating the FPS.
Needless to say this is a potato machine with AMD APU so performance is important.
If needed I'll upload the data to my drive.
I hope this repo is still being maintained. it's been > a year after last commit.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this Barina. Do your text boxes contain a lot of text? The fixer algorithm can be optimized but it would be rather cumbersome and we don't have too much time for this project. And we haven't had more reports of perf issues.
As a workaround you may be able to set the language once after the user presses confirm or something similar.
Hi @hk1ll3r thanks for the reply
Yea I figured you don't have much time for this project unfortunately..
So I did investigate further and looks like when changing the color (alpha in my case) of the TMP text, it gets rebuilt which I'm guessing is fine! (it raises the havePropertiesChanged flag)
But, iterating over the text is unnecessary when we explicitly know that it didn't changed.
Maybe it's a simple fix :) in RTLTextMeshPro.cs file, we can add a new string to hold "fixed text" and only update the base text when it doesn't match the fixed one.. or maybe we can add new flag haveTextChanged.
What is Happening:
Everything works great with the default language English. FPS starts to plummet when changing the language to Hebrew (RTL) using Unity's slider.
Now whenever the user interacts with any RTLTextMeshProUGUI (without changing the text), UI stutters.
It looks like the canvas is being rebuilt for no reason..
What is Expected:
Text is being rebuilt only once and scripts should be optimized at least a bit.
Extra Details:
Consider the profiler screenshot below:
Needless to say this is a potato machine with AMD APU so performance is important.
If needed I'll upload the data to my drive.
I hope this repo is still being maintained. it's been > a year after last commit.
The text was updated successfully, but these errors were encountered: