Optimize reading model from cache
Optimize reading model from cache

It is very slow to do ca.depends_on() calls. If they are needed, we would
rather do them when we save the model (if at all possible), instead of
doing them every time the model is loaded from cache.

For both the variable metadata and the delay durations we therefore figure
out what dependencies each expression has when saving the model, instead
of when loading it.

Note that ca.depends_on is faster if the expression on which it operates
is less complicated, as is the case for the uncached model. We therefore
do not just shift all the computational cost from loading to saving a
model, but also reduce the overall cost.

jgoppert/pymola,jgoppert/pymola