diff options
author | Julian Eisel <julian@blender.org> | 2022-08-18 20:18:55 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-08-18 21:22:55 +0300 |
commit | 75cca8360f611f6b79b65228d18fd6597267417f (patch) | |
tree | 10426eee48ad100740f037143a70151ffe46364a /source/blender/editors/space_outliner | |
parent | de794adc0c154c636e08ccc89e8734fcf0ac84af (diff) |
Outliner: Add commented out benchmarking calls for tree rebuilding
This way you can benchmark the tree rebuilding by simply commenting out
a single line. Not that it was difficult before, but this makes it as
easy as it gets, with basically no knowledge of existing benchmarking
tools required.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.cc b/source/blender/editors/space_outliner/outliner_tree.cc index 040bbb26be1..b3b2bb59e20 100644 --- a/source/blender/editors/space_outliner/outliner_tree.cc +++ b/source/blender/editors/space_outliner/outliner_tree.cc @@ -41,6 +41,7 @@ #include "BLI_fnmatch.h" #include "BLI_listbase.h" #include "BLI_mempool.h" +#include "BLI_timeit.hh" #include "BLI_utildefines.h" #include "BLT_translation.h" @@ -1698,6 +1699,10 @@ void outliner_build_tree(Main *mainvar, return; } + /* Enable for benchmarking. Starts a timer, results will be printed on function exit. */ + // SCOPED_TIMER("Outliner Rebuild"); + // SCOPED_TIMER_AVERAGED("Outliner Rebuild"); + OutlinerTreeElementFocus focus; outliner_store_scrolling_position(space_outliner, region, &focus); |