Blender Git Loki
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
31 Modified Paths:
/source/blender/blenkernel/intern/facemap.c (+10, -10) (Diff)
/source/blender/editors/armature/pose_select.c (+7, -2) (Diff)
/source/blender/editors/include/ED_transform.h (+7, -3) (Diff)
/source/blender/editors/include/ED_view3d.h (+2, -1) (Diff)
/source/blender/editors/object/object_edit.c (+5, -1) (Diff)
/source/blender/editors/space_graph/graph_edit.c (+28, -16) (Diff)
/source/blender/editors/space_image/space_image.c (+12, -2) (Diff)
/source/blender/editors/space_node/space_node.c (+63, -32) (Diff)
/source/blender/editors/space_sequencer/sequencer_view.c (+51, -35) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+27, -10) (Diff)
/source/blender/editors/space_view3d/view3d_intern.h (+10, -6) (Diff)
/source/blender/editors/space_view3d/view3d_widgets.c (+279, -99) (Diff)
/source/blender/editors/transform/transform_manipulator.c (+261, -145) (Diff)
/source/blender/editors/transform/transform_manipulator2d.c (+61, -13) (Diff)
/source/blender/makesdna/DNA_view3d_types.h (+3, -4) (Diff)
/source/blender/makesdna/DNA_widget_types.h (+5, -8) (Diff)
/source/blender/makesrna/intern/rna_pose.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_wm.c (+1, -0) (Diff)
/source/blender/windowmanager/widgets/intern/widget_library/arrow_widget.c (+9, -4) (Diff)
/source/blender/windowmanager/widgets/intern/widget_library/cage_widget.c (+13, -10) (Diff)
/source/blender/windowmanager/widgets/intern/widget_library/widget_library_intern.h (+1, -1) (Diff)
/source/blender/windowmanager/widgets/intern/widget_library/widget_library_utils.c (+1, -1) (Diff)
/source/blender/windowmanager/widgets/intern/wm_widget.c (+42, -25) (Diff)
/source/blender/windowmanager/widgets/intern/wm_widgetgroup.c (+29, -17) (Diff)
/source/blender/windowmanager/widgets/intern/wm_widgetmap.c (+87, -116) (Diff)
/source/blender/windowmanager/widgets/intern/wm_widget_intern.h (+3, -5) (Diff)
/source/blender/windowmanager/widgets/WM_widget_api.h (+15, -7) (Diff)
/source/blender/windowmanager/widgets/WM_widget_library.h (+3, -4) (Diff)
/source/blender/windowmanager/widgets/WM_widget_types.h (+20, -6) (Diff)
/source/blender/windowmanager/widgets/wm_widget_wmapi.h (+5, -4) (Diff)
/source/blenderplayer/bad_level_call_stubs/stubs.c (+1, -1) (Diff)
/source/blender/editors/armature/pose_select.c (+7, -2) (Diff)
/source/blender/editors/include/ED_transform.h (+7, -3) (Diff)
/source/blender/editors/include/ED_view3d.h (+2, -1) (Diff)
/source/blender/editors/object/object_edit.c (+5, -1) (Diff)
/source/blender/editors/space_graph/graph_edit.c (+28, -16) (Diff)
/source/blender/editors/space_image/space_image.c (+12, -2) (Diff)
/source/blender/editors/space_node/space_node.c (+63, -32) (Diff)
/source/blender/editors/space_sequencer/sequencer_view.c (+51, -35) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+27, -10) (Diff)
/source/blender/editors/space_view3d/view3d_intern.h (+10, -6) (Diff)
/source/blender/editors/space_view3d/view3d_widgets.c (+279, -99) (Diff)
/source/blender/editors/transform/transform_manipulator.c (+261, -145) (Diff)
/source/blender/editors/transform/transform_manipulator2d.c (+61, -13) (Diff)
/source/blender/makesdna/DNA_view3d_types.h (+3, -4) (Diff)
/source/blender/makesdna/DNA_widget_types.h (+5, -8) (Diff)
/source/blender/makesrna/intern/rna_pose.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_wm.c (+1, -0) (Diff)
/source/blender/windowmanager/widgets/intern/widget_library/arrow_widget.c (+9, -4) (Diff)
/source/blender/windowmanager/widgets/intern/widget_library/cage_widget.c (+13, -10) (Diff)
/source/blender/windowmanager/widgets/intern/widget_library/widget_library_intern.h (+1, -1) (Diff)
/source/blender/windowmanager/widgets/intern/widget_library/widget_library_utils.c (+1, -1) (Diff)
/source/blender/windowmanager/widgets/intern/wm_widget.c (+42, -25) (Diff)
/source/blender/windowmanager/widgets/intern/wm_widgetgroup.c (+29, -17) (Diff)
/source/blender/windowmanager/widgets/intern/wm_widgetmap.c (+87, -116) (Diff)
/source/blender/windowmanager/widgets/intern/wm_widget_intern.h (+3, -5) (Diff)
/source/blender/windowmanager/widgets/WM_widget_api.h (+15, -7) (Diff)
/source/blender/windowmanager/widgets/WM_widget_library.h (+3, -4) (Diff)
/source/blender/windowmanager/widgets/WM_widget_types.h (+20, -6) (Diff)
/source/blender/windowmanager/widgets/wm_widget_wmapi.h (+5, -4) (Diff)
/source/blenderplayer/bad_level_call_stubs/stubs.c (+1, -1) (Diff)