diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-09 16:13:37 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-09 16:29:46 +0300 |
commit | 12c235a1c515d41a18c497d6647253698579c01d (patch) | |
tree | 0d946f20e30d5971c7f835a288d8111b063e5b1e /source/blender/editors/object/object_modifier.cc | |
parent | cef1b9c30f9ac96143d31f81d23db60dcf526f5a (diff) |
Subdiv: Avoid quadratic runtime for loose edges
Currently, when subdividing every single vertex on every loose edge,
Blender iterates over all other edges to find neighbors. This has
quadratic runtime and can be very slow. Instead, first create a
map of edges connected to each vertex.
With about 10000 edges, the performance goes from very slow to very
smooth in my tests. Because of the nature of quadratic runtime, the
improvement will depend massively on the number of elements.
The only downside to this is that the map will still be built when
there are only a couple loose edges, but that case is probably not
so common.
Differential Revision: https://developer.blender.org/D15923
Diffstat (limited to 'source/blender/editors/object/object_modifier.cc')
0 files changed, 0 insertions, 0 deletions