sortTies is a bottleneck when adding ties to a multi-domain function #38962
Labels
Bug
Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing)
ISIS Team: Core
Issue and pull requests managed by the Core subteam at ISIS
ISIS Team: Diffraction
Issue and pull requests managed by the Diffraction subteam at ISIS
Milestone
Describe the bug
In PR #38515 a
MultiDomainFunction
is used to share peak parameters across adjacent pixels.However the execution time for the algorithm
IntegratePeaks1DProfile
has increased by an order of magnitude (or more!) - the bottleneck is due tosortTies
being run for each tie added. The actual fit is very quick.mantid/Framework/API/src/IFunction.cpp
Line 1600 in 13795d0
To Reproduce
(1) Run this script in debug with a breakpoint at the line above
You will see
sortTies
gets called for every tie(2) Increase the number of spectra
Observe that it takes a lot longer - if you set this too high (e.g.
NumBanks=100
Mantid will hang)Expected behavior
Would call
sortTies
once after all ties added?Screenshots
Platform/Version (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: