changeset 1362:bf6db7d2f8b1

fix slow DCMTK problem
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 15 May 2015 17:33:43 +0200
parents 94ffb597d297
children feaf2840917c
files NEWS Resources/CMake/BoostConfiguration.cmake Resources/CMake/DcmtkConfiguration.cmake Resources/CMake/GoogleLogConfiguration.cmake Resources/CMake/OpenSslConfiguration.cmake Resources/Patches/dcmtk-linux-speed.patch
diffstat 6 files changed, 53 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Fri May 15 17:19:33 2015 +0200
+++ b/NEWS	Fri May 15 17:33:43 2015 +0200
@@ -1,11 +1,26 @@
 Pending changes in the mainline
 ===============================
 
-* Huge speed-up in Orthanc Explorer for large amount of images
+Major
+-----
+
 * "?expand" flag for URIs "/patients", "/studies" and "/series"
+* "/tools/find" URI to search for DICOM resources from REST
 * Support of FreeBSD
+
+Minor
+-----
+
+* Speed-up in Orthanc Explorer for large amount of images
+* Speed-up of the C-Find SCP server of Orthanc
+* Allow replacing PatientID/StudyInstanceUID/SeriesInstanceUID from Lua scripts
+
+Fixes
+-----
+
 * Prevent freeze on C-FIND if no DICOM tag is to be returned
-* Allow replacing PatientID/StudyInstanceUID/SeriesInstanceUID from Lua scripts
+* Fix slow C-Store SCP on recent versions of Linux, if
+  USE_SYSTEM_DCMTK is set to OFF (http://forum.dcmtk.org/viewtopic.php?f=1&t=4009)
 * Fix issue 30 (QR response missing "Query/Retrieve Level" (008,0052))
 * Fix issue 32 (Cyrillic symbols): Introduction of the "Windows1251" encoding
 
--- a/Resources/CMake/BoostConfiguration.cmake	Fri May 15 17:19:33 2015 +0200
+++ b/Resources/CMake/BoostConfiguration.cmake	Fri May 15 17:33:43 2015 +0200
@@ -104,7 +104,7 @@
     # (including XCode 5.1). Fixes issue 14 of Orthanc.
     # https://trac.macports.org/ticket/42282#comment:10
     execute_process(
-      COMMAND patch -p0 -i ${ORTHANC_ROOT}/Resources/Patches/boost-1.55.0-clang-atomic.patch
+      COMMAND patch -p0 -N -i ${ORTHANC_ROOT}/Resources/Patches/boost-1.55.0-clang-atomic.patch
       WORKING_DIRECTORY ${BOOST_SOURCES_DIR}
       )
   endif()
--- a/Resources/CMake/DcmtkConfiguration.cmake	Fri May 15 17:19:33 2015 +0200
+++ b/Resources/CMake/DcmtkConfiguration.cmake	Fri May 15 17:33:43 2015 +0200
@@ -100,6 +100,11 @@
       ${DCMTK_SOURCES_DIR}/oflog/libsrc/winsock.cc
       )
     
+    execute_process(
+      COMMAND patch -p0 -N -i ${ORTHANC_ROOT}/Resources/Patches/dcmtk-linux-speed.patch
+      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+      )
+
   elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
     list(REMOVE_ITEM DCMTK_SOURCES 
       ${DCMTK_SOURCES_DIR}/oflog/libsrc/unixsock.cc
@@ -108,7 +113,7 @@
     if (${CMAKE_COMPILER_IS_GNUCXX})
       # This is a patch for MinGW64
       execute_process(
-        COMMAND patch -p0 -i ${ORTHANC_ROOT}/Resources/Patches/dcmtk-mingw64.patch
+        COMMAND patch -p0 -N -i ${ORTHANC_ROOT}/Resources/Patches/dcmtk-mingw64.patch
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
         )
     endif()
--- a/Resources/CMake/GoogleLogConfiguration.cmake	Fri May 15 17:19:33 2015 +0200
+++ b/Resources/CMake/GoogleLogConfiguration.cmake	Fri May 15 17:33:43 2015 +0200
@@ -66,22 +66,22 @@
   if (CMAKE_COMPILER_IS_GNUCXX)
     if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
       execute_process(
-        COMMAND patch utilities.cc ${ORTHANC_ROOT}/Resources/Patches/glog-utilities-lsb.diff
+        COMMAND patch -N utilities.cc ${ORTHANC_ROOT}/Resources/Patches/glog-utilities-lsb.diff
         WORKING_DIRECTORY ${GOOGLE_LOG_SOURCES_DIR}/src
         )
     else()
       execute_process(
-        COMMAND patch utilities.cc ${ORTHANC_ROOT}/Resources/Patches/glog-utilities.diff
+        COMMAND patch -N utilities.cc ${ORTHANC_ROOT}/Resources/Patches/glog-utilities.diff
         WORKING_DIRECTORY ${GOOGLE_LOG_SOURCES_DIR}/src
         )
     endif()
 
     execute_process(
-      COMMAND patch port.h ${ORTHANC_ROOT}/Resources/Patches/glog-port-h.diff 
+      COMMAND patch -N port.h ${ORTHANC_ROOT}/Resources/Patches/glog-port-h.diff 
       WORKING_DIRECTORY ${GOOGLE_LOG_SOURCES_DIR}/src/windows
       )
     execute_process(
-      COMMAND patch port.cc ${ORTHANC_ROOT}/Resources/Patches/glog-port-cc.diff 
+      COMMAND patch -N port.cc ${ORTHANC_ROOT}/Resources/Patches/glog-port-cc.diff 
       WORKING_DIRECTORY ${GOOGLE_LOG_SOURCES_DIR}/src/windows
       )
 
--- a/Resources/CMake/OpenSslConfiguration.cmake	Fri May 15 17:19:33 2015 +0200
+++ b/Resources/CMake/OpenSslConfiguration.cmake	Fri May 15 17:33:43 2015 +0200
@@ -188,7 +188,7 @@
 
   elseif ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
     execute_process(
-      COMMAND patch ui_openssl.c ${ORTHANC_ROOT}/Resources/Patches/openssl-lsb.diff
+      COMMAND patch -N ui_openssl.c ${ORTHANC_ROOT}/Resources/Patches/openssl-lsb.diff
       WORKING_DIRECTORY ${OPENSSL_SOURCES_DIR}/crypto/ui
       )
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/Patches/dcmtk-linux-speed.patch	Fri May 15 17:33:43 2015 +0200
@@ -0,0 +1,24 @@
+diff -urEb dcmtk-3.6.0.orig/dcmnet/libsrc/dul.cc dcmtk-3.6.0/dcmnet/libsrc/dul.cc
+--- dcmtk-3.6.0.orig/dcmnet/libsrc/dul.cc	2010-12-01 09:26:36.000000000 +0100
++++ dcmtk-3.6.0/dcmnet/libsrc/dul.cc	2015-05-15 17:03:50.762451757 +0200
+@@ -1840,7 +1840,7 @@
+     }
+ #endif
+ #endif
+-    setTCPBufferLength(sock);
++    //setTCPBufferLength(sock);
+ 
+ #ifndef DONT_DISABLE_NAGLE_ALGORITHM
+     /*
+diff -urEb dcmtk-3.6.0.orig/dcmnet/libsrc/dulfsm.cc dcmtk-3.6.0/dcmnet/libsrc/dulfsm.cc
+--- dcmtk-3.6.0.orig/dcmnet/libsrc/dulfsm.cc	2010-12-01 09:26:36.000000000 +0100
++++ dcmtk-3.6.0/dcmnet/libsrc/dulfsm.cc	2015-05-15 17:03:55.570451952 +0200
+@@ -2417,7 +2417,7 @@
+           return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
+         }
+ #endif
+-        setTCPBufferLength(s);
++        //setTCPBufferLength(s);
+ 
+ #ifndef DONT_DISABLE_NAGLE_ALGORITHM
+         /*