# HG changeset patch # User Sebastien Jodogne # Date 1473232804 -7200 # Node ID ba55b35b20ea63acef9d3ef283ecc02fa6dde42e # Parent 7b67cfa8a3aa3cc9d3ecfa0cc86f4e272786e037 Performance warning if runtime debug assertions are turned on diff -r 7b67cfa8a3aa -r ba55b35b20ea NEWS --- a/NEWS Wed Jul 20 13:49:49 2016 +0200 +++ b/NEWS Wed Sep 07 09:20:04 2016 +0200 @@ -1,6 +1,8 @@ Pending changes in the mainline =============================== +* Performance warning if runtime debug assertions are turned on + Version 0.3 (2016/06/28) ======================== diff -r 7b67cfa8a3aa -r ba55b35b20ea Plugin/Plugin.cpp --- a/Plugin/Plugin.cpp Wed Jul 20 13:49:49 2016 +0200 +++ b/Plugin/Plugin.cpp Wed Sep 07 09:20:04 2016 +0200 @@ -140,10 +140,21 @@ } +static bool DisplayPerformanceWarning(OrthancPluginContext* context) +{ + (void) DisplayPerformanceWarning; // Disable warning about unused function + OrthancPluginLogWarning(context, "Performance warning in DICOMweb: " + "Non-release build, runtime debug assertions are turned on"); + return true; +} + + extern "C" { ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context) { + assert(DisplayPerformanceWarning(context)); + /* Check the version of the Orthanc core */ if (OrthancPluginCheckVersion(context) == 0) {