Closed christophe-david closed 5 months ago
Attention: 3 lines
in your changes are missing coverage. Please review.
Comparison is base (
15b04af
) 84.16% compared to head (4eeb488
) 84.24%. Report is 1 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
src/fastoad/io/configuration/configuration.py | 50.00% | 1 Missing and 1 partial :warning: |
src/fastoad/openmdao/problem.py | 98.71% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR fixes some performance problems of FAST-OAD.
To get knowledge of the structure of OpenMDAO problems, a setup operation is needed. Until now, due to the several changes that were done separately, this setup operation was done almost each time information was needed, which proved to be CPU costly.
Here the problem analysis is done in only one place, which allows to reduce to the minimum the number of setup calls. There is still one "additional" setup operation needed to analyze the problem, and possibly another one if dynamically shaped variables are inputs of the problem.
Also,
write_needed_inputs
implementation has been put back inFASTOADPoblem
(while keeping theFASTOADProblemConfigurator
method), which allows to spare 2 setup calls when called on the problem instance that will do the computation (when done fromFASTOADProblemConfigurator
, it is done on a separate instance).As a result, the integration test
test_oad_process
uses now 2 setup calls, instead of 10 previously.