100x+ slow down when using time() to animate parameter

   1567   2   1
User Avatar
Member
95 posts
Joined: Feb. 2020
Offline
I'm using the python time()expression to animate some node properties, lets say, to move a box along in a certain axis. So I write up parm expression to do this, something like time()*.01.

I'm noticing that whenever houdini needs to reference the current frame in a parm expression, the node evaluation time can shoot up more than 100x.

You can see in my attached image of the performance monitor that using the transform which uses the time()expression is responsible for 63.4% of the cook time, while the normal transform without such an expression accounts for <1%.

I'm sure Houdini does some intelligent patterns for cooking of nodes. But such a big slow down makes animating properties with time() basically impossible for anything but the most basic of scenes.

Am I missing something here about now to use time()/$FF to animate properties? Is there a way to use time() to animate properties that does not involve a huge performance hit?
Edited by wyhinton1 - Dec. 18, 2022 07:23:25

Attachments:
time_slow.png (285.2 KB)
TIME_ISSUE_HIP_FILE.hip (73.4 KB)

User Avatar
Member
2658 posts
Joined: June 2008
Offline
I think very few use the time() function in that manner. Try using $T instead. It is faster.
$T*0.1
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
User Avatar
Member
8177 posts
Joined: Sept. 2011
Offline
wyhinton1
I'm using the python time()expression to animate some node properties, lets say, to move a box along in a certain axis. So I write up parm expression to do this, something like time()*.01.

I'm noticing that whenever houdini needs to reference the current frame in a parm expression, the node evaluation time can shoot up more than 100x.

You can see in my attached image of the performance monitor that using the transform which uses the time()expression is responsible for 63.4% of the cook time, while the normal transform without such an expression accounts for <1%.

I'm sure Houdini does some intelligent patterns for cooking of nodes. But such a big slow down makes animating properties with time() basically impossible for anything but the most basic of scenes.

Am I missing something here about now to use time()/$FF to animate properties? Is there a way to use time() to animate properties that does not involve a huge performance hit?

You're comparing animated to not animated. Of course the performance hit is huge. It's infinitely huge.
  • Quick Links