Blender Git Commit Log

Git Commits -> Revision dffd032

Revision dffd032 by Hans Goudey (master)
December 9, 2021, 23:43 (GMT)
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

Commit Details:

Full Hash: dffd032bc9b9cd0dbb710f1f3d3f0b14361bc267
Parent Commit: 1841274
Lines Changed: +16, -4

1 Modified Path:

/source/blender/blenkernel/intern/geometry_set.cc (+16, -4) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021