Performance Monitor / Python Workflows

   2602   3   1
User Avatar
Member
54 posts
Joined: 8月 2010
Offline
Hey All,

I was dabbling with chucking out a per frame performance monitor file whilst i cache (start, cook geo, stop, save profile). Largely seems to work as expected but theres a few things i'm unsure about:

1. The performance monitor seems to be getting clogged up with all these profiles, i cant see how to purge them once saved? it sounds like
cancel()
would do it but it doesnt look like you can both stop / save the stats and cancel?

2. I wanted to do this accross pre / post frame scripts but i couldnt find how you would reference the profile again if you dont have the variable set in one script like the helps example (
profile = hou.perfMon.startProfile()
). I thought there would be a kind of
hou.perfMon.Profile(profilename).stop()
way of doing this? I also tried active profile but it didnt seem to be quite right

Anyone done workflows with this and got useful tips?

~Craig
~ Craig Tonks | CG Supervisor | Outpost VFX
User Avatar
Member
4730 posts
Joined: 2月 2012
Offline
Hi Craig,

I am also doing something similar so can share my experience.

AFAIK there is no way to purge the perf mon pane tab UI from the loaded profiles. One way I am trying involves sending a key press event to the widget that holds the perf mon tab.

But for the key press to actually be received by the perf mon widget, you also have to move the cursor in code to be over the perf mon pane tab.

Other way I can think of is to recreate the pane tab each time. Again this is less than ideal, but working is better than ideal

As for #2, you can store your perf mon profile in hou.session.

There are a lot more things you have to be mindful such as using the save method instead of using the stats method if you want a valid output, and saving this data on your geo means, having to read the file on disk and then write to disk each time you want to load this data, etc.

Let me know if you need more tips
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
54 posts
Joined: 8月 2010
Offline
Thanks man! Appreciate the reply!

Should of followed up in here; i did talk to sidefx, confirmed the limitations and get this logged as an RFE for extra python functionality so we’ll see if anything comes of that
~ Craig Tonks | CG Supervisor | Outpost VFX
User Avatar
Member
4730 posts
Joined: 2月 2012
Offline
mrtonks
Thanks man! Appreciate the reply!

Should of followed up in here; i did talk to sidefx, confirmed the limitations and get this logged as an RFE for extra python functionality so we’ll see if anything comes of that

Crossing my fingers
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
  • Quick Links