diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-10 02:43:30 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-10 02:43:30 +0300 |
commit | dffd032bc9b9cd0dbb710f1f3d3f0b14361bc267 (patch) | |
tree | 61dbce4e8189efd6fb3dcaf1e1c3978625c50f65 /source/blender/depsgraph/DEG_depsgraph_debug.h | |
parent | 18412744c8c4231216133f958f74bc38cce54e75 (diff) |
Geometry Nodes: Remove unnecessary copy when replacing data
In the `replace_mesh`/`replace_curve` etc. methods, the component
was retrieved with write access. Retrieving with write access will
duplicate the data if the component has another user. This means that
the replaced geometry data was often duplicated just to be deleted
a moment later.
I expect this would have a large impact in performance in some specific
situations when dealing with large geometry. In a scene with many small
meshes though, I didn't observe a significant difference.
This also makes replacing a geometry set's data with the same data
that's already in the set safe. It would be valid to assert for that
case instead, but this seems safer.
Differential Revision: https://developer.blender.org/D13530
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph_debug.h')
0 files changed, 0 insertions, 0 deletions