You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At present, in storage_tiering_configuration.cpp, for each configuration value, we first check for the existence of the value with nlohmann::basic_json::find, before fetching the value with nlohmann::basic_json::at, like so:
To my understanding, this is inefficient.
The return value of nlohmann::basic_json::find is an iterator, which will already contain the value we're looking for (or a reference to it) if it was found, but we throw it away and find the value again with nlohmann::basic_json::at.
At present, in
storage_tiering_configuration.cpp
, for each configuration value, we first check for the existence of the value withnlohmann::basic_json::find
, before fetching the value withnlohmann::basic_json::at
, like so:irods_capability_storage_tiering/storage_tiering_configuration.cpp
Lines 23 to 26 in 7ec9561
To my understanding, this is inefficient.
The return value of
nlohmann::basic_json::find
is an iterator, which will already contain the value we're looking for (or a reference to it) if it was found, but we throw it away and find the value again withnlohmann::basic_json::at
.See
irods_server_properties.hpp
for an example of proper usage ofnlohmann::basic_json::find
:https://github.com/irods/irods/blob/84a09f945899b5ad85bb3d4cc451812e9dc05358/lib/core/include/irods_server_properties.hpp#L68-L71
The text was updated successfully, but these errors were encountered: