Commit 5b12d96e authored by Nick Draper's avatar Nick Draper
Browse files

Stop the AlgorithmObserver Py export monitoring progress

This would be a big performance issue, so remove the ability.
parent 322f5415
......@@ -18,12 +18,14 @@ void AlgorithmObserverAdapter::progressHandle(const API::IAlgorithm *alg,
const double estimatedTime,
const int progressPrecision) {
UNUSED_ARG(alg)
try {
return callMethod<void>(getSelf(), "progressHandle", p, msg, estimatedTime,
progressPrecision);
} catch (UndefinedAttributeError &) {
return;
}
UNUSED_ARG(msg)
UNUSED_ARG(estimatedTime)
UNUSED_ARG(progressPrecision)
// This method is explicitly not implemented.
// There are so many progress calls that apssing these across the C++/Python
// boundary is too expensive and can slow down Mantid by up to an order of
// magnitude
return;
}
void AlgorithmObserverAdapter::startingHandle(API::IAlgorithm_sptr alg) {
......
......@@ -24,12 +24,6 @@ void observeError(AlgorithmObserver &self, const boost::python::object &alg) {
self.observeError(calg);
}
void observeProgress(AlgorithmObserver &self,
const boost::python::object &alg) {
IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg);
self.observeProgress(calg);
}
void stopObserving(AlgorithmObserver &self, const boost::python::object &alg) {
IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg);
self.stopObserving(calg);
......@@ -51,8 +45,6 @@ void export_algorithm_observer() {
"Observe algorithm for its finish notification.")
.def("observeError", &observeError, (arg("self"), arg("alg")),
"Observe algorithm for its error notification.")
.def("observeProgress", &observeProgress, (arg("self"), arg("alg")),
"Observe algorithm for its progress notification.")
.def("stopObserving", &stopObserving, (arg("self"), arg("alg")),
"Remove all observers from the algorithm.");
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment