Mercurial > hg > orthanc
changeset 2088:b9428d5f7eaf
Fix serious performance issue with C-FIND
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 16 Sep 2016 12:22:30 +0200 |
parents | e9e6ffbf0fd5 |
children | 7a969f235adf |
files | NEWS OrthancServer/OrthancFindRequestHandler.cpp OrthancServer/Search/LookupResource.cpp |
diffstat | 3 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Fri Sep 16 11:53:17 2016 +0200 +++ b/NEWS Fri Sep 16 12:22:30 2016 +0200 @@ -16,6 +16,7 @@ Maintenance ----------- +* Fix serious performance issue with C-FIND * Fix extraction of the symbolic name of the private tags * Performance warning if runtime debug assertions are turned on
--- a/OrthancServer/OrthancFindRequestHandler.cpp Fri Sep 16 11:53:17 2016 +0200 +++ b/OrthancServer/OrthancFindRequestHandler.cpp Fri Sep 16 12:22:30 2016 +0200 @@ -651,6 +651,8 @@ std::vector<std::string> resources, instances; context_.GetIndex().FindCandidates(resources, instances, finder); + LOG(INFO) << "Number of candidate resources after fast DB filtering: " << resources.size(); + assert(resources.size() == instances.size()); bool complete = true;
--- a/OrthancServer/Search/LookupResource.cpp Fri Sep 16 11:53:17 2016 +0200 +++ b/OrthancServer/Search/LookupResource.cpp Fri Sep 16 12:22:30 2016 +0200 @@ -125,16 +125,16 @@ levels_[ResourceType_Patient] = new Level(ResourceType_Patient); break; - case ResourceType_Study: - levels_[ResourceType_Study] = new Level(ResourceType_Study); + case ResourceType_Instance: + levels_[ResourceType_Instance] = new Level(ResourceType_Instance); // Do not add "break" here case ResourceType_Series: levels_[ResourceType_Series] = new Level(ResourceType_Series); // Do not add "break" here - case ResourceType_Instance: - levels_[ResourceType_Instance] = new Level(ResourceType_Instance); + case ResourceType_Study: + levels_[ResourceType_Study] = new Level(ResourceType_Study); break; default: