Ticket #2528 (closed: fixed)
Minor tidy up for ParComponentFactory pooling
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | major | Milestone: | Iteration 28 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Michael Whitty |
Description
The ParComponentFactory was not being used everywhere when creating parametrized objects. Tidy this up and implement the pooling of detector objects.
This should help speed up tight multi-threaded loops that call MatrixWorkspace::getDetector as it caches an object rather than creating a new one each time.
For example,
PARALLEL_FOR1(outputWS) for(int i = 0; i < nhist; ++i) { IDetector_sptr det = outputWS->getDetector(i) } this type of loop does not scale for Parameterized objects as new blocks the threading.
Change History
Note: See
TracTickets for help on using
tickets.
(In [9631]) Implemented parametrized detector pooling to speed up loops around MatrixWorkspace::getDetector. The example loop in the ticket for a dataset with ~300000 histograms now takes ~0.3 seconds on an 8-core machine versus 1.5 previously. Re #2528