AllenInstitute / MIES

Multichannel Igor Electrophysiology Suite
https://alleninstitute.github.io/MIES/user.html
Other
21 stars 6 forks source link

Add caching to GetActiveChannels #2154

Open MichaelHuth opened 1 week ago

MichaelHuth commented 1 week ago

For SweepFormula select with selvis(all) the function GetActiveChannels is called for each filtered sweep number channel type channel number * sweepMapIndex (from multiple experiments) to determine what channels to include in the selection.

GetActiveChannels itself iterated over all channel numbers of that channel type (e.g. 16 for AD) and gets a LNB entry. For each LNB entry miss three LNB requests are make (normal, old unassoc, new unassoc).

This turns out to be a performance bottleneck.

One way to speed this up would be to cache the result of GetActiveChannels.