# HG changeset patch # User Alain Mazy # Date 1675330395 -3600 # Node ID 02cfd23a556ad7ee6b558cf5cb9dd289ab6c963e # Parent 874e6b135614fea8b0ecf47a1836e96c5c40a221 CppCheck diff -r 874e6b135614 -r 02cfd23a556a OrthancFramework/Sources/DicomParsing/DicomModification.cpp --- a/OrthancFramework/Sources/DicomParsing/DicomModification.cpp Thu Feb 02 09:40:48 2023 +0100 +++ b/OrthancFramework/Sources/DicomParsing/DicomModification.cpp Thu Feb 02 10:33:15 2023 +0100 @@ -1842,7 +1842,7 @@ void DicomModification::GetReplacedTags(std::set& target) const { target.clear(); - for (Replacements::const_iterator it = replacements_.begin(); it != replacements_.end(); it++) + for (Replacements::const_iterator it = replacements_.begin(); it != replacements_.end(); ++it) { target.insert(it->first); } diff -r 874e6b135614 -r 02cfd23a556a OrthancServer/Resources/ImplementationNotes/memory_consumption.txt --- a/OrthancServer/Resources/ImplementationNotes/memory_consumption.txt Thu Feb 02 09:40:48 2023 +0100 +++ b/OrthancServer/Resources/ImplementationNotes/memory_consumption.txt Thu Feb 02 10:33:15 2023 +0100 @@ -58,7 +58,7 @@ In this test, we have measured the time required to anonymize a 2000 instances study with various configurations. It appears that malloc_trim or the total amount -of memory available in the system has no significant impact of performance. +of memory available in the system has no significant impact on performance. - No malloc trim, 300 MB in the system: ~ 38s - No malloc trim, 1500 MB in the system: ~ 38s diff -r 874e6b135614 -r 02cfd23a556a OrthancServer/Resources/RunCppCheck.sh --- a/OrthancServer/Resources/RunCppCheck.sh Thu Feb 02 09:40:48 2023 +0100 +++ b/OrthancServer/Resources/RunCppCheck.sh Thu Feb 02 10:33:15 2023 +0100 @@ -20,6 +20,7 @@ stlFindInsert:../../OrthancServer/Sources/OrthancWebDav.cpp:377 stlFindInsert:../../OrthancServer/Sources/ServerJobs/MergeStudyJob.cpp:40 stlFindInsert:../../OrthancServer/Sources/ServerJobs/SplitStudyJob.cpp:190 +stlFindInsert:../../OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp:334 syntaxError:../../OrthancFramework/Sources/SQLite/FunctionContext.h:52 syntaxError:../../OrthancFramework/UnitTestsSources/DicomMapTests.cpp:72 syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:132 @@ -36,7 +37,7 @@ assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:289 assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:388 assertWithSideEffect:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:3490 -assertWithSideEffect:../../OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp:241 +assertWithSideEffect:../../OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp:272 EOF ${CPPCHECK} --enable=all --quiet --std=c++11 \ diff -r 874e6b135614 -r 02cfd23a556a OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp --- a/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp Thu Feb 02 09:40:48 2023 +0100 +++ b/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp Thu Feb 02 10:33:15 2023 +0100 @@ -665,20 +665,14 @@ } bool replacePatientMainDicomTags = false; - bool replaceStudyMainDicomTags = false; - bool replaceSeriesMainDicomTags = false; - bool replaceInstanceMainDicomTags = false; ResourceType modificationLevel = modification_->GetLevel(); std::set replacedTags; modification_->GetReplacedTags(replacedTags); - for (std::set::const_iterator it = replacedTags.begin(); it != replacedTags.end(); it++) + for (std::set::const_iterator it = replacedTags.begin(); it != replacedTags.end(); ++it) { replacePatientMainDicomTags |= DicomMap::IsMainDicomTag(*it, ResourceType_Patient); - replaceStudyMainDicomTags |= DicomMap::IsMainDicomTag(*it, ResourceType_Study); - replaceSeriesMainDicomTags |= DicomMap::IsMainDicomTag(*it, ResourceType_Series); - replaceInstanceMainDicomTags |= DicomMap::IsMainDicomTag(*it, ResourceType_Instance); } if ((modificationLevel == ResourceType_Study || modificationLevel == ResourceType_Patient) diff -r 874e6b135614 -r 02cfd23a556a OrthancServer/Sources/ServerJobs/ResourceModificationJob.h --- a/OrthancServer/Sources/ServerJobs/ResourceModificationJob.h Thu Feb 02 09:40:48 2023 +0100 +++ b/OrthancServer/Sources/ServerJobs/ResourceModificationJob.h Thu Feb 02 10:33:15 2023 +0100 @@ -64,9 +64,9 @@ std::set instancesToReconstruct_; // for each new series generated, an instance id that we can use to reconstruct the hierarchy DB model protected: - virtual bool HandleInstance(const std::string& instance) ORTHANC_OVERRIDE; // from ThreadedSetOfInstancesJob + virtual bool HandleInstance(const std::string& instance) ORTHANC_OVERRIDE; - virtual void PostProcessInstances(); + virtual void PostProcessInstances() ORTHANC_OVERRIDE; public: explicit ResourceModificationJob(ServerContext& context, unsigned int workersCount);