UITooltip Transition performance issues?

*UIToolkit

So, I added a very simple scale transition to a UI element and the FPS gets hit extremely hard.

What should I do here? It’s an incredibly simple scale up.

.bar-container {
    transition-duration: 0.5s;
    transition-timing-function: ease-out-back;
}

.bar-container:hover {
    color: white;
    font-size: 24;
    scale: 1.25 1.25;
    transition-property: scale;
    transition-duration: 0.5s;
}

8518937--1135910--FPS Drop.gif

Which version are you using ? In 2021 it’s necessary to tweak the Usage Hints of Visual Elements to achieve better performance. You can set these in code or from UI Builder. Based on your example I would go with adding UsageHints.GroupTransform to the element that has the .bar-container class.

In 2022 we started adding logic to turn this hints on automatically when transitions are being applied.

Okay, I can upgrade versions.

I tried adding GroupTransform to all of the bar-container elements but sadly, I still had a 20 fps drop :frowning:

Try removing font-size: 24; from the hover. Changing the font size trigger the full regeneration of the geometry of the element while the other properties should be optimized, but that optimization will be useless if the geometry changes.

The text should still scale up with the scale property.

Could you also share a profiler capture of the frame so that we can see what actually takes time?

okay hang on

Removing the font size, still a ~20ish fps drop.

Pretty substantial loss in readability by reducing the font size on hover, I’ll have to scale it up a lot in base.

8523488--1136912--PerformanceRecord.gif

It seems that the editor loop is taking most of the time, and we don’t have any details with the capture you provided. You will need to share more details on the forums, or to file a bug with this. By filling a bug using your project, we have much more information on what you are actually doing, but the forum tend to be quicker to get an answer.

I’ll be upgrading to the new version anyways, so this may just be lost to the sands of time.