Search Unity

TMP_UpdateManager.DoRebuilds performance

Discussion in 'UGUI & TextMesh Pro' started by justtime, May 23, 2020.

  1. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Hi there! Unity 2019.3.14f, TMP 2.1.0 preview 13
    Is it ok, that it takes ~3ms on Pixel 3a dev build?
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    How many text objects in the scene?

    Do you have auto-size on all of them?

    Keep in mind that Dev builds are anywhere between 5x and 10x slower than release builds.
     
  3. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    A lot. 150-300. Without auto-size.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    If the scale of these text objects is static (ie. their scale will not change in the life cycle), you can enable IsStaticScale in the Extra Settings. This will remove them from the internal update and as such, this overhead should pretty much all go away.
     
    justtime likes this.
  5. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Thanks. Can i do that, if TMP GO's have static scale, but their parent not?
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    No. This internal update is required to track scale changes that affect the text object and in turn the SDFScale which then needs to be updated.

    How is the scale of the parent changing and what is the frequency of the change?
     
  7. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Hi there! I've set static checkbox and performance issue was gone, but i also noticed, that it works fine even if tmp text parent changes its scale.
     
  8. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Also, when i revert to 2.0.1 i lost my align settings for every tmp object.
     
  9. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    It depends on the amount of scale change. Incorrect scaling will make the text appear too soft or too harsh but subtle scale changes might not make this apparent.