summaryrefslogtreecommitdiffstats
path: root/editor/editor_profiler.cpp
diff options
context:
space:
mode:
authorRanoller <davarrcal@hotmail.com>2019-01-26 19:54:04 +0100
committerGitHub <noreply@github.com>2019-01-26 19:54:04 +0100
commitd7c72dc2d129dd0c8b5546fb47b5fc730ed2e500 (patch)
treeb6d048b4b6cb830845fd1f69ba2d98c58c1318bf /editor/editor_profiler.cpp
parentc2f59de212546e2005e4cbdde9515599cdaa3b78 (diff)
downloadredot-engine-d7c72dc2d129dd0c8b5546fb47b5fc730ed2e500.tar.gz
Profiler list functions from max to less expensive
Solves https://github.com/godotengine/godot/issues/25328 and partially https://github.com/godotengine/godot/issues/5682
Diffstat (limited to 'editor/editor_profiler.cpp')
-rw-r--r--editor/editor_profiler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp
index e0baca9299..dee589ad3f 100644
--- a/editor/editor_profiler.cpp
+++ b/editor/editor_profiler.cpp
@@ -392,7 +392,7 @@ void EditorProfiler::_update_frame() {
category->set_custom_color(0, _get_color_from_signature(m.categories[i].signature));
}
- for (int j = 0; j < m.categories[i].items.size(); j++) {
+ for (int j = m.categories[i].items.size() - 1; j >= 0; j--) {
const Metric::Category::Item &it = m.categories[i].items[j];
TreeItem *item = variables->create_item(category);