comparison Framework/Plugins/PluginInitialization.cpp @ 127:3424a54ca2ee OrthancPostgreSQL-3.1

fix performance warning
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 08 Feb 2019 19:54:13 +0100
parents f73050ad32b4
children 534759b0cf14
comparison
equal deleted inserted replaced
125:b85d672afcb5 127:3424a54ca2ee
63 LOG(ERROR) << "Your version of Orthanc (" << context->orthancVersion 63 LOG(ERROR) << "Your version of Orthanc (" << context->orthancVersion
64 << ") must be above 0.9.5 to run this plugin"; 64 << ") must be above 0.9.5 to run this plugin";
65 return false; 65 return false;
66 } 66 }
67 67
68 if (OrthancPluginCheckVersionAdvanced(context, 1, 4, 0) == 1) 68 if (OrthancPluginCheckVersionAdvanced(context, 1, 5, 4) == 1)
69 { 69 {
70 ImplicitTransaction::SetErrorOnDoubleExecution(true); 70 ImplicitTransaction::SetErrorOnDoubleExecution(true);
71 isOptimal = true; 71 isOptimal = true;
72 } 72 }
73 73
109 int major = boost::lexical_cast<int>(tokens[0]); 109 int major = boost::lexical_cast<int>(tokens[0]);
110 int minor = boost::lexical_cast<int>(tokens[1]); 110 int minor = boost::lexical_cast<int>(tokens[1]);
111 int revision = boost::lexical_cast<int>(tokens[2]); 111 int revision = boost::lexical_cast<int>(tokens[2]);
112 112
113 isOptimal = (major > 1 || 113 isOptimal = (major > 1 ||
114 (major == 1 && minor > 4) || 114 (major == 1 && minor > 5) ||
115 (major == 1 && minor == 4 && revision >= 0)); 115 (major == 1 && minor == 5 && revision >= 4));
116 } 116 }
117 } 117 }
118 118
119 if (!isOptimal && 119 if (!isOptimal &&
120 isIndex) 120 isIndex)
121 { 121 {
122 LOG(WARNING) << "Performance warning in " << dbms 122 LOG(WARNING) << "Performance warning in " << dbms
123 << " index: Your version of Orthanc (" 123 << " index: Your version of Orthanc ("
124 << context->orthancVersion << ") should be upgraded to 1.5.2 " 124 << context->orthancVersion << ") should be upgraded to 1.5.4 "
125 << "to benefit from best performance"; 125 << "to benefit from best performance";
126 } 126 }
127 127
128 128
129 std::string description = ("Stores the Orthanc " + 129 std::string description = ("Stores the Orthanc " +