Dear All,
I'm running into some problems I do not know how to figure out, and perhaps you can help me, as you usually do. I'm trying to “optimize” my code, disabling all re-computations while I'm manipulating the obj network from Python (inside the Python shell). The “manipulations” I'm referring to include node additions/deletions and/or paramtere changes. so, the idea is to “freeze” Houdini from cooking during a moment, re-shape (manipulate) the network, and after that unfreeze Houdini and let it do its usual work and build the geometry. However, I also need to have timings of the diferent stages. Basically, I need two fundamental timings the graph manipulation stage and the time it took Houdini to re-cook everything.
I've tried with hou.setUpdateMode(hou.updateMode.Manual) to “freeze” and hou.setUpdateMode(hou.updateMode.AutoUpdate) to “unfreeze”, and the time library to show the timings (with time.clock or time.time depending on the OS). However, the results for the cooking step seem unrealistic I get just 1.07 seconds while I've seen Houdini cooking for at least 30 seconds or more (and I may have re-computations that take up to 20 minutes!!!). My feeling is that it is not the time library, but Houdini returning control to the library even when it is still cooking… are they separate threads?
So… any ideas? How can I get precise timings for these two stages? Am I correctly freezing Houdini, or am I wrong with respect to this, too?
any help will be GREATLY appreciated!
thanks a lot
dagush.-
Freezing cooking while manipulating the network with Python
3783 4 1- dagush
- Member
- 98 posts
- Joined: Sept. 2008
- Offline
- edward
- Member
- 7743 posts
- Joined: July 2005
- Offline
- dagush
- Member
- 98 posts
- Joined: Sept. 2008
- Offline
Hi,
Thanks for the answer!
I've tested it and it seems to run really fine, so this is a fantastic solution for the “freezing/unfreezing” part.
Now, I still have the timings problem how can I, from Python, know the time that a given step in the process took (in my case, network pre-processing and final cook). As I've mentioned, it seems to me that Houdini runs the Python shell in a separate thread, as the times I'm getting are clearly unrealistic (less than one second for a 35-second cook!).
Any ideas on this part?
Anyway, thanks for the answer! It's THE solution for that part of my problem!
thanks
dagush.-
Thanks for the answer!
I've tested it and it seems to run really fine, so this is a fantastic solution for the “freezing/unfreezing” part.
Now, I still have the timings problem how can I, from Python, know the time that a given step in the process took (in my case, network pre-processing and final cook). As I've mentioned, it seems to me that Houdini runs the Python shell in a separate thread, as the times I'm getting are clearly unrealistic (less than one second for a 35-second cook!).
Any ideas on this part?
Anyway, thanks for the answer! It's THE solution for that part of my problem!
thanks
dagush.-
————————-
* skylineEngine project coordinator
* buildingEngine module developer
http//ggg.udg.edu/skylineEngine
* skylineEngine project coordinator
* buildingEngine module developer
http//ggg.udg.edu/skylineEngine
- edward
- Member
- 7743 posts
- Joined: July 2005
- Offline
- dagush
- Member
- 98 posts
- Joined: Sept. 2008
- Offline
-
- Quick Links