Hey all, I’ve been struggling with performance issues and occasional frame drops when building native UIs in TD and I’ve recently been trying to profile my solutions. I found that input rate has a somewhat big impact in total load (in my case, mouse polling rate) and was wondering if this is a behavior that can / could be changed in the future. I’m sharing a project file where I count the events that are triggered via a panel execute for the insideu value, gather total load using the perform and analyze CHOPs and display all using an OP viewer. Moving the mouse over the perform window seems to trigger redraws (or some other load) in correspondence to what my mouse polling rate is set to up to 500Hz. Here are the results:
As you can see, the moment we start moving the cursor around on the panel, it ruins the timing of the physics. When checking, timeslicing is disabled, and there is no way to know that the chop is cooking multiple times per frame besides the behavior observed.
In the end I managed to mitigate it with
if scriptOp.cookedThisFrame:
return
Though it would have been nice to have better grip on whats happening here.
I’d for sure wish for more control over this, particularly when it comes to user input, it looks like even Widget COMPs and their embedded TOPs will cook multiple times per frame if you have a high polling device interacting with the window.