I’m working with the hololens and it is very sensitive to performance.
Is there anywhere I can read on best practices with TMP in regards to performance?
Anything I definitely shouldn’t do? like with ugui best fit option
My first toe dip into performance has shown there are different prices for TextAlignmentOptions.
A test of 1024 texts with random text. the first chunk is rendered Midline and the chunk in the end is Capline
Exploring all the different alignment options a bit more systematically.
The bulk of difference is in PlayerSendFrameStarted…
Sadly the profiler data is a bit to large to upload
For drawing, the size (on screen), number of text objects and shader selection and what features are enabled on the shaders will have an impact on performance.
Text auto-sizing which is very expensive will have an impact on the cpu when the text is being regenerated.
Deep Profile and profiling in the Editor isn’t very representative of how a particular piece of code performs.
Deep Profile in particular often leads to wrong performance conclusions, because the overhead of method instrumentation itself gets expensive really fast and falsifies the results. Deep Profile often causes code, which actually performs fast, to appear as utterly slow.
In my experience, Deep Profile is useful to find where GC Alloc’s are made, or to get an idea what a particular method is actually doing, but I don’t use it to judge whether a function needs to be optimized.
Ah yeah the images might be a little misleading, all the test are running on a Microsoft Hololens and not in the editor.
With remote profiling the deep flag doesn’t have much effect to my knowledge and the fps with/without attach profiler is minimal I think.