Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2022-08-18 20:18:55 +0300
committerJulian Eisel <julian@blender.org>2022-08-18 21:22:55 +0300
commit75cca8360f611f6b79b65228d18fd6597267417f (patch)
tree10426eee48ad100740f037143a70151ffe46364a /source/blender/editors/space_outliner
parentde794adc0c154c636e08ccc89e8734fcf0ac84af (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.cc5
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);