Blender Git Commit Log

Git Commits -> Revision d1efaad

Revision d1efaad by Julian Eisel (wiggly-widgets)
May 18, 2016, 15:44 (GMT)
Rewrite Widget Update->Draw Routine (Massive Performance Boost)

This commit merges work done in temp_widgets_update_tagging branch into wiggly-widgets branch. It gives a speedup of up to ~500x (yes, 50,000%!) for simple view navigation in my benchmarks (more detailed results below).

Instead of re-creating all widgets on each redraw (like we do it for buttons), we now keep widgets and do some more advanced updating instead.
The widget-map update routine is now split into three steps:
* init - Initialize widget groups, only done once.
* refresh - Refresh data of widget groups, only if widget-map has been explicitly tagged for update by calling WM_widgetmap_tag_refresh.
* draw_prepare - Stuff that needs to be done on every redraw (currently used by 3D transform manipulator).

Also contains some unrelated cleanup.

Benchmark results:
The numbers below are average results, I repeated all tests multiple times while tying to keep conditions as similar as possible. I measured the time needed update and draw the widget map.
We have to distinguish between a simple redraw which leaves widget data mostly untouched and a data refresh. To trigger a simple redraw I rotated the view, for triggering data refreshes I continuously toggled selection.

1. Default .blend, 3 objects, transform manipulator
-- Simple redraw: ~4.5x speedup (0.00009 vs. 0.000020 sec.)
-- Data refresh: ~1.6x speedup (0.000033 vs. 0.000021 sec.)

2. Frank pose mode, 9 face map widgets + transform manipulator
-- Simple redraw: ~420x speedup (0.0231 vs. 0.000055 sec.)
-- Data refresh: ~2x speedup (0.014834 vs. 0.007417 sec.)

3. Caminandes island mesh, 197,151 verts, transform manipulator
-- Simple redraw: ~500x speedup (0.011596 vs. 0.000023 sec.)
-- Data refresh: Only ~1.05x speedup (0.009376 vs. 0.008970 sec.)

Commit Details:

Full Hash: d1efaadb524b23bd13b1bdd1db8143da9a6bda54
Parent Commit: c572c16
Lines Changed: +1062, -588

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2019