Skip to content

Commit c03c7ea

Browse files
committed
[RF][HS3] Remove redundant check in variable export
The check for already added variables was redundant, because in the `exportObject()` function we already check if a given argument was already exported, tracking this in a standard map. This drastically reduces performance and memory usage, because the lookup in the JSON itself was very slow and memory hungry, because of some caching that nlohmann-json tries to do when looking up in array collections.
1 parent a3828be commit c03c7ea

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

roofit/hs3/src/RooJSONFactoryWSTool.cxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,11 +1016,6 @@ void RooJSONFactoryWSTool::exportVariable(const RooAbsArg *v, JSONNode &node)
10161016
return;
10171017
}
10181018

1019-
// this variable was already exported
1020-
if (findNamedChild(node, v->GetName())) {
1021-
return;
1022-
}
1023-
10241019
JSONNode &var = appendNamedChild(node, v->GetName());
10251020

10261021
if (cv) {

0 commit comments

Comments
 (0)