Geometry Nodes: Use implicit sharing in store/capture attribute nodes #107357

Merged
Hans Goudey merged 1 commits from HooglyBoogly/blender:implicit-sharing-capture-field into main 2023-04-26 14:39:01 +02:00

1 Commits

Author SHA1 Message Date
Hans Goudey d394783176 Geometry Nodes: Use implicit sharing in store/capture attribute nodes
buildbot/vexp-code-patch-coordinator Build done. Details
Some fields reference attributes directly. When the referenced attribute
has the requested type and domain, the captured/stored attribute can
share its array, avoiding the cost of duplication and reducing memory
usage, at least temporarily until either attribute is modified.

This only works when the attribute doesn't need validation and when
the selection input isn't used, since those potentially need to change
values in the arrays.

I saw this save 200MB and 11 ms in a simple test with 16 million points.
2023-04-25 22:41:59 -04:00