If you create a wrapper  function that does all the actual work, you could
call that using the profile tools from within your compute/doit method. I
haven't tried that so I can't say how well it works if at all. I would use
the profile tools during algorithm design before I implement it into plug-in
code. All the openMaya objects can be called from right in the Maya
environment so I would profile it and then package it up into a scripted
command.


On Tue, Oct 21, 2008 at 2:37 AM, Horvátth Szabolcs
<[EMAIL PROTECTED]>wrote:

>
> Hi Matthew,
>
> Thanks for the tip, I did not know python had such profiler classes in
> the main package. I'm a bit confused though how to profile a scripted
> plugin command in Maya. I can't really call the doIt function, can I?
>
> Cheers,
> Szabolcs
>
>
> Matthew Chapman wrote:
> > A good way to monitor code performance is pythons profiler.
> >
> > http://www.python.org/doc/2.5.2/lib/node794.html
> >
> > I was working on a mo-cap stabilizer and I used it, I was able to move
> > calls around and get almost double my performance. It does timings and
> > counts for each function call.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to