Closed PMSeitzer closed 7 months ago
This has to do with very expensive computations performed for some molecular formulas in the isotopes widget, probably from refactor in #656
Simplest way might be to try and respect some of the IsotopeParameters
in the MassCalculator::getNaturalAbundanceDistribution()
call. Also possible to do some caching here
As a part of this work, remove oldMassCalculator::computeIsotopes()
, which was deprecated with the introduction of MassCalculator::computeIsotopes2()
.
There was some old pullIsotopes
stubs in peakdetector
, which probably have not been used for a few years now
Upon deeper investigation, it appears that MassCalculator::getComposition()
might be hanging on formic acid adducts.
The culprit turned out to be an infinite loop where the selected index of a combo box was manually changed, firing a signal, which triggered a new event, which caused the index to change, which fired a signal, etc.
Simple solution is to block unwanted signals from manual index update: f45d7933f3f524d76d1d6875fc9472c90c8605bb
Probably related to repeated calls from
MassCalculator::getComposition()
.