initial startup speed-up
Created by: maedoc
When just trying to write unit tests and run them, the startup time of the library is slow enough to get distracted (8.2 s on i5 SSD Mac). Looking at the extensive log output, I saw enough delay between warnings of different models to realize that importing all models is causing this delay.
I then commented the imports of tvb.simulator.models.init and saw startup time drop to 0.5 s. I would guess that this speed drop is due to the gufunc or neotraits class registration, not yet sure which.
The current fix is breaking code such as
from tvb.simulator.models import Linear
so it would be useful to resolve the underlying problem or implement a lazy loading approach, since, at runtime, only one model is usually in use; loading all is excessive.
@mihandrei @liadomide ideas?