Home Website Youtube GitHub

30s+ freeze when first key is applied

Hello!

I’ve been having a problem for a a while using mGear rigs: when I first modify or set a key on scene opening, I get a huge freeze until it comes back in and I can work normally uninterrupted.

A quick look at the profiler tells me Qt is to blame. Someone told me it must be related to some kind of callback.


The 3 blue blocks are 3 different QtTimers.

Disabling the mGear solvers in the plugins drastically reduces this freeze but do not seem to completely remove it (less than 1s though).

Any idea what could be going on?

I’ve seen this on non-Shifter rigs too. I really don’t know why. I usually try to disable some features like playback caching and “evaluate controllers” in the evaluation/GPU settings.

One thing you could try (test this on a duplicate rig file so you don’t break your actual rig) is to delete all controller tags.

import pymel.core as pm
pm.delete(pm.ls(type='controller'))

This will break custom pick-walking (which you may or may not even use).

This might also be happening because you have many controller tags built up over time between multiple rig builds. I delete old controller tags in a PRE script. I don’t know if old controller tags with no connections would cause increased lag. But they might.

Another thing I would avoid is using proxy attributes. I’ve avoided them severely since Maya 2019 when they were very buggy. They might cause some cyclic paths in your DAG. (Not full cycles, but just messier paths down the DAG.)

Another thing to avoid is putting your hostUI on a controller that is inside the limb that it is controlling. For example, do not put the hostUI for the IK/FK switch on a controller inside the arm. Put it on the chest or body or COG or closer to the root of your hierarchy. That will slightly increase your FPS, but maybe in recent Maya versions it is causing some of this lag too. I don’t know.

Summary:

  • Try a test to delete all controller tags.
  • If that helps, build again with controller tags. Maybe it was all the old ones built up.
  • Avoid using proxy attributes. Turn it off on the guide settings and rebuild.
  • Avoid putting the hostUI controls on limbs. Put them separate from the nodes which are being controlled by the hostUI.
  • Read the docs about parallel eval and see if there are any settings you can disable to try and speed things up. If Maya says claims it will speed it up, try disabling it. :slight_smile:

Awesome Chris, thanks for the very complete answer! I’ll chase that one when I have the time and report back.