From 2dcdae44708f126e40bdbfe80434e9bcde8898d9 Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Thu, 28 Apr 2022 16:30:45 +0200 Subject: [PATCH] Remove redundant call to Serialize() in ConfigItem::Commit() The very same object is already serialized a few lines above, the result is even stored in a variable, but that variable was not used before. Simply using this variable results in a noticeable improvement of config validation times. --- lib/config/configitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index 37c711d65..3dd31df9c 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -288,7 +288,7 @@ ConfigObject::Ptr ConfigItem::Commit(bool discard) Dictionary::Ptr persistentItem = new Dictionary({ { "type", type->GetName() }, { "name", GetName() }, - { "properties", Serialize(dobj, FAConfig) }, + { "properties", serializedObject }, { "debug_hints", dhint }, { "debug_info", new Array({ m_DebugInfo.Path,