Try looking up python cprofiler.
Yury
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/e7373880-cf36-4835-ad81-ca5d9d6e31fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
http://www.huyng.com/posts/python-performance-analysis/
The line profiler would make this a lot easier for you to profile. Just decorate the desired function with @profile
No imports needed.
Then run it with kernprof.py and the desired flags.
For simple calls into the Maya commands, it would be hard to know what the implementation is doing. It very well could be loading a larger data structure the first time, and then hitting a cache for subsequent calls.