Currently, importing pynwb inside of src/visiomode/webpanel/export.py accounts for around 75% of the time required for visiomode to start (4.035 seconds with versus 1.040 seconds without on my machine).
Since any import of the base visiomode module leads to the pynwb import, it would be nice to delay the import until it is needed. Because it is only needed for a single function that is actually rarely called, this would end up saving time in the vast majority of use cases (especially tests).
Currently, importing
pynwb
inside ofsrc/visiomode/webpanel/export.py
accounts for around 75% of the time required forvisiomode
to start (4.035 seconds with versus 1.040 seconds without on my machine). Since any import of the basevisiomode
module leads to thepynwb
import, it would be nice to delay the import until it is needed. Because it is only needed for a single function that is actually rarely called, this would end up saving time in the vast majority of use cases (especially tests).