-
-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PERF: Remove SystemInformation data from ResourceProbe, fix issue #350
ITK 4.9 added system info to `itk::ResourceProbe` (the base class of `itk::TimeProbe` and `itk::MemoryProbe`), by calling `GetSystemInformation()` in its constructor. This function call appeared very time consuming. Using Visual Studio 2017 (Release configuration), it was observed that a single `GetSystemInformation()` function call took more than 0.1 second. This commit removes the `this->GetSystemInformation()` function call from ResourceProbe, deprecates the member function, removes the related data members, and only retrieves the system info when and where it is actually being used: in `PrintSystemInformation` and `PrintJSONSystemInformation`. Fixes issue #350, "Major performance issue TimeProbe, ResourceProbe constructor", which was based on the analysis of an `elastix` example case by Theo van Walsum (@tvanwalsum).
- Loading branch information
Showing
2 changed files
with
53 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters