Version 1.20260723.2#590
Merged
Merged
Conversation
Effectively revert commit 4da6a24. This wasn't the issue!
There was a problem hiding this comment.
Pull request overview
Introduces a new release version and adds caching for compiled CellmlFileRuntime instances so repeated CellmlFile::runtime() calls can reuse an already-compiled runtime.
Changes:
- Bump library version to
1.20260723.2. - Add
CellmlFiledestructor to support cache cleanup. - Add a global runtime cache in
CellmlFile::Impl::runtime()and remove cache entries on destruction.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| VERSION.txt | Updates the project version string. |
| src/support/cellml/cellmlfile.h | Declares an overridden CellmlFile destructor. |
| src/support/cellml/cellmlfile.cpp | Adds a global compiled-runtime cache and erases entries in ~CellmlFile(). |
Comments suppressed due to low confidence (1)
src/support/cellml/cellmlfile.cpp:133
- CellmlFile::Impl::runtime() can return an uncached runtime in races: two threads can both miss the initial lookup, both compile, then the second try_emplace fails but the function still returns its locally created runtime (not the one stored in the cache). Also, the cache lookup doesn’t account for whether pNlaSolver is nullptr, even though that affects generated runtime code under EMSCRIPTEN (cellmlfileruntime.cpp:73-113). Consider caching separately based on NLA-solver presence and, after compilation, re-checking/returning the canonical cached instance.
CellmlFileRuntimePtr CellmlFile::Impl::runtime(const CellmlFilePtr &pCellmlFile, const SolverNlaPtr &pNlaSolver)
{
// Check whether we already have a compiled runtime and if so then return it.
{
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.