This implements the update cache described in T95401.
The cache is currently only used for drawing strokes, sculpting (using the push brush), and changing RNA properties on layers (e.g. changing the opacity or
the layer transform). Note: Making use of the cache throughout grease pencil will have to be done incrementally in other patches.
Demo on an Intel® Core™ i7-9700 CPU @ 3.00GHz with 8 cores:
Performance tests:
Test file: heavy_test_file.blend (from T91945)
Single GP object with:
- 86 layers
- 11k frames
- 300k stokes
- 13M points
OS: Windows 10
CPU: Intel(R) Xeon(R) E5-1650 v4 @ 3.60GHz
| Drawing strokes (average of 10) | Changing layer opacity (average of 10) | Sculpting strokes (push brush, 100 strokes) | |
| master (2022-02-02) | 1.1201844 s | 1.1050539 s | 0.8 - 1.1 fps |
| patch | 0.0013894 s (~ x800) | 0.0012322 s (~ x900) | 20 - 24 fps |
Measurements done using --debug-depsgraph-time.
Remaining issues:
- Fix memory leaks
Design task: T95401
Co-authored-by: @Yann Lanthony (yann-lty)