Compilation should use ast caching to create a per model hash. Model dependency graph is then used to create hashes of packages etc. When the user changes one file in the vscode workspace, it only rebuilds ast for dependent models.
The caching could be conceivably be at three levels:
- ast (easiest and most obvious) , but not clear that parsing is actually a bottleneck
- phase-dae, this would be interesting as flattening many models in the same modelica file can be slow
- phase-solve, if we have additional structures like mass matrices that must be derived for the particular model, then this could also be cached, but it would also depend on the user solver selection etc for the model, this kind of makes it more attractive to have phase-solve produced a separate annotation ir instead of just tacking it onto phase-dae
Compilation should use ast caching to create a per model hash. Model dependency graph is then used to create hashes of packages etc. When the user changes one file in the vscode workspace, it only rebuilds ast for dependent models.
The caching could be conceivably be at three levels: