changeset 7173:745b6573db71

Fixed performance regression when a plugin is accessing only the DICOM tags of a file
author Alain Mazy <am@orthanc.team>
date Tue, 20 Oct 2026 09:51:09 +0200
parents b7a765bb2812
children 2c0758ba1ab6
files NEWS OrthancServer/Plugins/Engine/OrthancPlugins.cpp
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Tue Oct 20 09:48:12 2026 +0200
+++ b/NEWS	Tue Oct 20 09:51:09 2026 +0200
@@ -40,6 +40,8 @@
 * Fixed preview of YBR_FULL images encoded in JPEG-LS
   (https://discourse.orthanc-server.org/t/orthanc-preview-does-not-show-correctly/6488)
 * Reduced the number of SQL queries when accessing /instances/../tags
+* Fixed performance regression when a plugin is accessing only the DICOM tags of a file
+  (https://discourse.orthanc-server.org/t/1-13-0-orthancpluginloaddicominstance-reads-the-whole-dicom-file-in-emptypixeldata-and-untilpixeldata-modes/6489)
 * Fix use of the static runtime under Visual Studio (/MT), which broke in 1.12.10
 * New CMake options: 
   - "THIRD_PARTY_DOWNLOADS_ROOT_URL" to specify another webserver to downloads the third-parties from.
--- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp	Tue Oct 20 09:48:12 2026 +0200
+++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp	Tue Oct 20 09:51:09 2026 +0200
@@ -5166,7 +5166,7 @@
 
         {
           PImpl::ServerContextReference lock(*pimpl_);
-          std::unique_ptr<DicomDataSource::Dicom> loaded(lock.GetContext().ReadParsedDicom(params.instanceId));
+          std::unique_ptr<DicomDataSource::Dicom> loaded(lock.GetContext().ReadDicomUntilPixelData(params.instanceId));
           parsed.reset(loaded->Clone());
         }