Skip to content

Conversation

@samuelgarcia
Copy link
Member

@samuelgarcia samuelgarcia commented Oct 14, 2025

The write_binary_recording() was using the memmap machinery but this is a bad idea for writing because it synchronize the buffer with the disk before writing with a read and this make it more slow.

Of some system with netowrk drive this PR make the writing to binary 2 times faster witth this simple PR.

@h-mayorquin : I did also some test on the reading side, but there is no effect on perf so for now I keep memmap machinery on reading side. But maybe we could switch to this also in binary extarctor : simple seek and np.fromfile

@chrishalcrow
Copy link
Member

Looks good. For me locally, this makes a big difference (almost x2) for n_jobs=1 (just re-saving an untouched openephys file), and the improvement diminishes as n_jobs increases.

Copy link
Collaborator

@h-mayorquin h-mayorquin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

We discussed this in person, this is great.

@alejoe91
Copy link
Member

@samuelgarcia time for pre-commit please :)

@alejoe91 alejoe91 added the core Changes to core module label Oct 20, 2025
@alejoe91 alejoe91 merged commit c79581d into SpikeInterface:main Oct 23, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes to core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants