Skip to content

perf: optimize expandedRefIdsForVar to better handle large dimensions#800

Merged
chrispcampbell merged 2 commits into
mainfrom
chris/797-optimize-expanded-ref-ids
Apr 10, 2026
Merged

perf: optimize expandedRefIdsForVar to better handle large dimensions#800
chrispcampbell merged 2 commits into
mainfrom
chris/797-optimize-expanded-ref-ids

Conversation

@chrispcampbell
Copy link
Copy Markdown
Contributor

Fixes #797

See issue for details. I tested with En-ROADS and also confirmed that there is no impact on the sample models in this repo.

AI disclosure

I guided Claude Code (Opus 4.6) to investigate the performance issue and to propose a fix. I refactored and refined the fix and tests myself.

Copy link
Copy Markdown
Collaborator

@ToddFincannonEI ToddFincannonEI left a comment

Choose a reason for hiding this comment

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

That's an impressive improvement. The algorithm makes sense and I think the tests give us enough confidence to move ahead.

@chrispcampbell chrispcampbell merged commit 879d3df into main Apr 10, 2026
6 checks passed
@chrispcampbell chrispcampbell deleted the chris/797-optimize-expanded-ref-ids branch April 10, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

expandedRefIdsForVar is very slow for variables that use multiple deep dimensions

2 participants