python-neo icon indicating copy to clipboard operation
python-neo copied to clipboard

`OpenEphysRawIO` header parse is slow

Open weiglszonja opened this issue 2 years ago • 4 comments

Hey,

I have ecephys data from the Tye lab in legacy OpenEphys format (.continuous files) and I'm using OpenEphysRecordingInterface from neuroconv to write the data to NWB (which uses OpenEphysLegacyRecordingExtractor from spikeinterface).

I noticed that initializing the interface is slow, and I could trace it back to OpenEphysRawIO where parsing the header for their recording takes at least 5 minutes. Do you have any idea what could contribute to this?

from neo.rawio import OpenEphysRawIO
# Parameters for conversion
neo_rawio = OpenEphysRawIO(folder_path)
neo_rawio.parse_header()

weiglszonja avatar Apr 06 '23 13:04 weiglszonja

@samuelgarcia Did you have a similar experience?

JuliaSprenger avatar Apr 06 '23 13:04 JuliaSprenger

I did this long time ago. I remember that this format is nto optimal and so slow to parse/check. I think mainly because of the spikes files but it is a guess. Szonja could you check the speed when removing spikes files ? If it is this we could add an option not not parse theses files.

samuelgarcia avatar Apr 07 '23 06:04 samuelgarcia

I think mainly because of the spikes files but it is a guess. Szonja could you check the speed when removing spikes files ?

@samuelgarcia I don't actually have .spikes files in the recording folder that was shared with me.

weiglszonja avatar Apr 08 '23 17:04 weiglszonja

@samuelgarcia Any more ideas for quick checks on how to avoid this or should we start profiling?

JuliaSprenger avatar Apr 26 '23 11:04 JuliaSprenger