[fixed in Hou19] Attrib wrangle 100 slower than attrib create?

   1230   2   2
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
UPDATE 2022:

cwhite
The VEX code itself is changing on each iteration due to the expressions, so that causes significant overhead from recompiling the code. You can use the Bindings tab as an alternative approach (see attached file)

this seems not be the case anymore in Houdini 19.0 and later.
Now, using that hscript expression directly inside a wrangle doesn't cause any overhead any longer.
The expression is:
v@asd`ftoa(detail(-1, "iteration",0))`

I couldn't find anything about it in the change-log, but I guess it was fixed.

================================================


================================================

Original Post:

Have a look at the setup in the .hip file.
There's a for-loop that creates 40 different vector attributes with a point wrangle.
Another for-loop does exactly the same with an 'attribute create' node.
Wrangle method is like 100 times slower on my system than 'attribute create' node, and I wonder why.
I guess single task-specific nodes are super optimized for the task and are generally preferable than multi-threaded wrangles.

Also, if you click on node info on the foreach_end you can see that the Memory consumption is much greater for the wrangle loop.

This leads to my second question: what does the Memory information means? Is the Ram needed to do the cooking on that particular node? And what does it means when 2 values are shown, "Memory" and "New"?

Another interesting find: try to increase the size of the 'attrib create' node from 1 to 4.
You will see that the memory consumption will stay fixed until size 3. And it will once you set the size to 4.

If you try to create a f, u, v, p attrib in the wrangle, the Memory consumption will increase accordingly.
Edited by Andr - Dec. 10, 2022 09:22:30

Attachments:
attrib_vec_performance.hiplc (138.4 KB)

User Avatar
Staff
727 posts
Joined: Oct. 2012
Offline
The VEX code itself is changing on each iteration due to the expressions, so that causes significant overhead from recompiling the code. You can use the Bindings tab as an alternative approach (see attached file)

Attachments:
attrib_vec_performance.hiplc (142.6 KB)

User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
Hello and thanks, this is very helpful!
Performance is much improved now.

and finally I understand the use of attributes bindings.
Edited by Andr - July 24, 2019 10:48:43
  • Quick Links