I will do my best to explain what the problem is. This project is a side project I am using for learning Databases and is a placeholder for a card game project I may make in the future. If I can’t find an answer to my problem, I will be OK with it.
In the screen shots below you will see magic cards. I am using magic the gathering’s database for now since it is large and lets me test the several things that can be done in UE4. I am NOT making a magic game since I hold no copyright to the cardart, frames or card text.
I created a deck builder system for the card game. The Level has no objects in it, just the widget overlay, with child widgets. It pulls text from a Database asset created from an excel file for each card.
I created it in 4.16.0 and when I load several cards into the vertical scrollbox, the frame rate goes below 15fps. I wasn’t able to figure out why, so I gave up.
When 4.18.0 came out I decided to try the project again. And to my happiness, it seemed fixed, the frame rate was 60fps+. So I added more stuff to the project. It was good in 4.18.0 - 4.18.3 I built with the Release versions.
When 4.19.0 Release came out I updated to it (I use perforce, so all my versions are backed up) and the problem with the frame rate is back.
When comparing both versions in a packaged version (and in editor), I noticed that the two major differences were the “Shape Bidirectional Text” and “Text Layout” were causing the lag (shown using “Stat Slate” console command). Screenshots below.
I did two tests in 4.19…
-
I took my CardFaceBase widget and set all the TextBlock’s visibility to “Collapsed”. The frame rate was 60fps.
-
I reset the visibility to “SelfHitTestInvisible” and change all the fonts I’m using to the default font (just in case the custom font was causing it). The frame rate was 15fps again.
So I am pretty sure it has to do with the TextBlock. No bindings are being used, the TextBlock is updated by SetText function. Also I am not using anything on tick. Is it doing something every frame it didn’t do in 4.18?
note: I did see something about bidirectional text in the 4.17 Release notes, but I never opened the project in 4.17 so I am not sure if the low frame rate was present there and then back in 4.19.
So ultimately my question is, does anyone know what could of changed in the TextBlock code that is causing it?
Here is the card widget
Here is the StatSlate report from a packaged 4.18.3 game. GOOD
Here is the StatSlate report from a packaged 4.19.0 game. BAD