Jump to content


Best way to profile Python/VEX operators?


  • Please log in to reply
4 replies to this topic

#1 magneto

magneto

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,302 posts
  • Joined: 04-October 11
  • Location:Canada
  • Name:Ryan K

Posted 16 June 2012 - 11:33 AM

I don't just mean the total cook time but profiling each instruction, function call to see where the bottleneck is, etc.

Is there a way to do this?

I use print statements for debugging but printing itself is slowing things down considerably to get an accurate timing.

Also is the total cook time for an operator (middle click) accurate enough to do comparisons? i.e. comparing 2 operators solely based on their cook time to see which one is faster?


Thanks :D

#2 Macha

Macha

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,654 posts
  • Joined: 23-July 08
  • Location:The Small Big P
  • Name:Marc ♥

Posted 17 June 2012 - 08:15 AM

That may help:

http://docs.python.o...ry/profile.html
My Vimeo

LinkedIn

improve side effects - use haskell


#3 magneto

magneto

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,302 posts
  • Joined: 04-October 11
  • Location:Canada
  • Name:Ryan K

Posted 17 June 2012 - 01:43 PM

Thanks this should help me a little :)

#4 graham

graham

    Houdini Master

  • Moderator
  • 668 posts
  • Joined: 13-September 06
  • Location:Santa Monica, CA
  • Name:Graham Thompson

Posted 17 June 2012 - 02:23 PM

Houdini 12 also has some Python hooks to the new Performance Monitor that you can also use for evaluating efficiency inside Python operators. http://www.sidefx.co...hom/hou/perfMon
I write python and break things.

#5 magneto

magneto

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,302 posts
  • Joined: 04-October 11
  • Location:Canada
  • Name:Ryan K

Posted 17 June 2012 - 03:25 PM

Thanks Graham, that's pretty amazing. I hope SESI adds a similar thing to VEX/VOPs.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users