[Bug]: Adding Large Stimulus Table with add_interval takes incredibly long #1946
Closed
3 tasks done
Labels
category: question
questions about code or code behavior
priority: medium
non-critical problem and/or affecting only a small set of NWB users
topic: HDMF
issues related to the use, depending on, or affecting HDMF
What happened?
I am trying to generate an NWB file with a rather large stim table row by row using
TimeIntervals.add_interval()
. The stim table for our experiment happens to be very large (>40,000 rows). Trying on two different machines, this takes more than 10 hours to do. The add_interval operation seems to be the bottleneck, and it takes greater amounts of time as the table gets longer.After digging through the code it looks like it might be
__calculate_idx_count
, perhaps bisect.Is there a more direct way to generate a TimeIntervals table from an existing table (while ensuring that types of each columns are properly casted)? Or is there a fix to the slowness of the add_interval operation?
Steps to Reproduce
Traceback
Operating System
Windows
Python Executable
Conda
Python Version
3.10
Package Versions
pynwb==2.8.1
Code of Conduct
The text was updated successfully, but these errors were encountered: