add_dios() needs to get data for each dio channel in each SpikegadgetsRawIO object (io). This requires calling io.get_digitalsignal() for each channel and io object.
io.get_digitalsignal() calls io.get_regressed_systime(), a relatively slow step, with a maximum cache on the call of 1 to avoid overloading memory
currently add_dios loops through all io objects seperately for each channel, meaning the cached systime is dropped each call of get_digital_signal()
Proposed improvement
Loop through channels for each SpikegadgetsRawIO object to take advantage of timestamp caching.
add_dios()
needs to get data for each dio channel in each SpikegadgetsRawIO object (io
). This requires callingio.get_digitalsignal()
for each channel andio
object.io.get_digitalsignal()
callsio.get_regressed_systime()
, a relatively slow step, with a maximum cache on the call of 1 to avoid overloading memoryadd_dios
loops through allio
objects seperately for each channel, meaning the cached systime is dropped each call ofget_digital_signal()
Proposed improvement Loop through channels for each
SpikegadgetsRawIO
object to take advantage of timestamp caching.