Hello,
I have a paginated UI. Each row of the paginated UI is a pooled row, so I always use the same rows and when I change the page, I reuse every row, setting the text with new values
So when I press next page, (only the first time), I have a huge performance spike in the testing device.
Debugging, I managed to figure out that the problem was setting the text in the TextMeshProUGUI elements in each row.
label.text = newValue; // label is TextMeshProUGUI
Deep profiling, I found that (apparently) the guilty is a method call
FontEngine.TryAddGlyphToTexture_Internal()
This method is called several times from TextMeshProUGUI.Rebuild(), with a big performance impact.
Because it only happens once, I assume it is initializing something lazily and in this moment it caches some textures or something like that
I have tried with other tmp_font_asset, and it doesn’t happen, so probably is some setting in the font configuration, but I don’t find which one.
Any clue or something that I can try?
Thanks
Unity 2022.3.37
TMP 3.2.0-pre.10