ModellingWebLab / cellmlmanip

CellML loading and model equation manipulation
Other
3 stars 1 forks source link

Parser speed optimisation #303

Closed MauriceHendrix closed 4 years ago

MauriceHendrix commented 4 years ago

Description

Improved parser speed by delaying adding mathematics until connections are known.

I also added tests for them, and in a few places in the parser changed the error thrown to and assert as I didn't I couldn't come up with a way to make it every throw that error, let me know if I've missed something there.

Motivation and Context

Parsing wasn't as fast as it could be

Types of changes

Speed improvement

Documentation checklist

Testing

codecov[bot] commented 4 years ago

Codecov Report

Merging #303 into develop will increase coverage by 0.59%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #303      +/-   ##
===========================================
+ Coverage    98.60%   99.19%   +0.59%     
===========================================
  Files            6        8       +2     
  Lines         1361     1368       +7     
  Branches       299      301       +2     
===========================================
+ Hits          1342     1357      +15     
+ Misses           7        4       -3     
+ Partials        12        7       -5     
Impacted Files Coverage Δ
cellmlmanip/__init__.py 100.00% <100.00%> (ø)
cellmlmanip/_config.py 100.00% <100.00%> (ø)
cellmlmanip/model.py 100.00% <100.00%> (+0.21%) :arrow_up:
cellmlmanip/parser.py 99.44% <100.00%> (+2.05%) :arrow_up:
cellmlmanip/units.py 98.41% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0598f44...51e0976. Read the comment docs.