Search Unity

TextMesh Pro TextMeshProp insane CPU usage (14ms)

Discussion in 'UGUI & TextMesh Pro' started by valentin56610, Oct 27, 2022.

  1. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    Hello there!

    So, I am deep profiling my game right now and noticing some serious issues when it comes to TextMeshPro

    It is so bad that it takes up to 15ms to rebuild the text (How??)

    Here's a screenshot of what my UI looks like and what the profiler looks like:
    Capture d’écran 2022-10-27 à 23.47.44.jpg
    image.jpeg

    - I have my FPS counter that shows the FPS. This runs in Update().
    - Timer at the top, also runs in Update()
    - All nicknames on the screen of all players are separate TextMeshPro Text UI game object that I move in Update(), there is 11 of them (deactivated if not in FOV of player).
    - All the rest is updated only when called (firing a weapon for the ammo, score at the top, etc)

    I don't know if this is linked to another issue I am having, but whenever I click / select a TextMeshPro - Text(UI) component the editor lags/freezes for a good second before I can do anything. This is for any TextMeshPro component.

    Some informations:
    I am on MacOS Ventura (issues were the same on Monterey), chip is the M1 Pro. Unity is 2021.3.5f1
    TextMeshPro package version is 3.0.6
     

    Attached Files:

  2. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    UPDATE: Just reached a new record of 350ms! What the.. How??
     

    Attached Files: