Skip to content

Improve caching of equivalent variables in analyser model.#1389

Open
hsorby wants to merge 15 commits into
cellml:mainfrom
hsorby:cache-equiv-vars
Open

Improve caching of equivalent variables in analyser model.#1389
hsorby wants to merge 15 commits into
cellml:mainfrom
hsorby:cache-equiv-vars

Conversation

@hsorby

@hsorby hsorby commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

@hsorby hsorby requested review from agarny and nickerso April 27, 2026 22:57

@agarny agarny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before reviewing further, I am going to wait for PR #1390 (for issue #1379) to be reviewed and merged in since it affects the caching code.

Comment thread src/api/libcellml/analysermodel.h Outdated

@agarny agarny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and definitely faster! Nice!

AnalyserModel::AnalyserModelImpl::buildEquivalentVariablesCache() should probably be called in AnalyserModel::areEquivalentVariables() (if the cache hasn't already been built), but having said that we know that the analyser is going to call AnalyserModel::areEquivalentVariables() many times, so I guess it's fine to call AnalyserModel::AnalyserModelImpl::buildEquivalentVariablesCache() upon retrieving the analyser model?

Comment thread src/analyser.cpp Outdated
Comment thread src/analysermodel.cpp Outdated
Comment thread src/analysermodel.cpp
Comment thread src/analysermodel.cpp
Comment thread src/analysermodel_p.h
Comment thread src/analysermodel.cpp Outdated
Comment thread src/analysermodel_p.h
Comment thread src/analysermodel_p.h Outdated
Comment thread src/analysermodel_p.h Outdated
Comment thread src/analysermodel.cpp Outdated
Comment thread src/analysermodel_p.h Outdated
Comment thread src/analysermodel_p.h Outdated
@hsorby hsorby requested a review from agarny May 21, 2026 06:57

@agarny agarny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks. "Just" some nitpicking.

Comment thread src/api/libcellml/analysermodel.h Outdated
Comment thread src/api/libcellml/analysermodel.h Outdated
Comment thread src/analysermodel_p.h
Comment thread src/analysermodel.cpp
Comment thread src/analysermodel_p.h
Comment thread src/analysermodel_p.h Outdated
Comment thread src/analysermodel_p.h Outdated
Comment thread .actrc Outdated
@hsorby hsorby force-pushed the cache-equiv-vars branch from 5744d8a to 1221fcd Compare May 21, 2026 09:16
@hsorby hsorby requested a review from agarny May 21, 2026 20:11

@agarny agarny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks!

Comment thread src/api/libcellml/analysermodel.h

@jmdowrick jmdowrick left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants