Skip to content

Improve desktop mode performance#275

Open
grahamfindlay wants to merge 7 commits into
SpikeInterface:mainfrom
grahamfindlay:perf/desktop-traceview
Open

Improve desktop mode performance#275
grahamfindlay wants to merge 7 commits into
SpikeInterface:mainfrom
grahamfindlay:perf/desktop-traceview

Conversation

@grahamfindlay

@grahamfindlay grahamfindlay commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Three parts:

(1) Align the spike vector dtype for fast np.searchsorted on trace view refresh

For 83.5M spikes, reduces each np.searchsorted call (triggered by every trace view refresh) from ~730 ms to ~4 us (essentially free).

(2) Avoid scanning the whole segment in get_selected_spikes_data

It built np.isin(arange(n_spikes_in_segment), selected) on every refresh.
For 83.5M spikes, was ~1.3s even with nothing selected, now essentially free.

(3) Avoid refreshing views hidden behind a tab (and do refresh them when brought forward)

…lder

argparse was stores --recording-base-folder as args.recording_base_folder, but
run_mainwindow_cli() was trying to access the non-existent args.recording_base_path.

That error was caught by the except and only printed a misleading
'check the path or the file format', so --recording silently failed.
For 83.5M spikes, reduces each call from ~730 ms to ~4 us aligned.
This is important, because it is triggered by every trace view refresh.
It built `np.isin(arange(n_spikes_in_segment), selected)` on every
refresh: ~1.3 s at 83.5M spikes, even with nothing selected.
`selected_indices` are absolute, so filter them to the segment and index
directly.
…sh (align spike dtype; direct-index selected spikes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant