This makes multires undo much faster and fixes the viewport lag after and undo operation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
- Branch
- multires-undo- (branched from master)
- Build Status
Buildable 5255 Build 5255: arc lint + arc unit
Event Timeline
| source/blender/editors/sculpt_paint/sculpt_undo.c | ||
|---|---|---|
| 103–110 | This is a loop with O(n^2) time complexity which can get really bad when doing e.g. mesh filter on multires with a high poly base mesh. 10k grids can lead to ~100 million iterations, and it gets words as the number of grids grows. Instead create a char array that says for a given grid index if the grid was updated or not, and then do a lookup with c_grid_index into it. | |