diff options
author | Jacques Lucke <jacques@blender.org> | 2022-09-17 13:08:43 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-09-17 13:08:57 +0300 |
commit | 7549e0c5ae36be739f0e0a38e87eb85428808e89 (patch) | |
tree | d931c76b0001cfc5bea7ac3f29287d91713ef5ac /source/blender/editors/space_node | |
parent | 1810b1e4c88191e3578518e12f9f3d318e08dc60 (diff) |
Geometry Nodes: use stringref instead of string in logger
This reduces logging overhead. The performance difference is only
significant when there are many fast nodes. In my test file with many
math nodes, the performance improved from 720ms to 630ms.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_draw.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index 3a8e5d0aed6..937db9951b4 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -1770,7 +1770,7 @@ struct NodeExtraInfoRow { }; struct NamedAttributeTooltipArg { - Map<std::string, geo_log::NamedAttributeUsage> usage_by_attribute; + Map<StringRefNull, geo_log::NamedAttributeUsage> usage_by_attribute; }; static char *named_attribute_tooltip(bContext *UNUSED(C), void *argN, const char *UNUSED(tip)) @@ -1824,7 +1824,7 @@ static char *named_attribute_tooltip(bContext *UNUSED(C), void *argN, const char } static NodeExtraInfoRow row_from_used_named_attribute( - const Map<std::string, geo_log::NamedAttributeUsage> &usage_by_attribute_name) + const Map<StringRefNull, geo_log::NamedAttributeUsage> &usage_by_attribute_name) { const int attributes_num = usage_by_attribute_name.size(); |