Skip to content

Read one gas's fit where only its fit is needed - #8

Merged
jtravs merged 1 commit into
mainfrom
perf/one-fit-per-lookup
Oct 24, 2026
Merged

jtravs merged 1 commit into
mainfrom
perf/one-fit-per-lookup

Conversation

@jtravs

@jtravs jtravs commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #7, found while measuring solprop's start-up. No value changes.

Three callers looked a parent fit up with fitted_models()[name], which builds all fifteen gas fits, each with its Kramers–Kronig absorption term:

  • gas.ionisation.electronic_static_polarizability, and through it ionisation_parameters and the ionisation rates;
  • the compact models.

They now use fitted_model(name), added in 0.9.0, which reads one record. ionisation_parameters("He") goes from 1.73 s to 0.88 s on the Mac. The entry-point test in tests/test_catalogue.py now also checks that the full set of fits is never built, and calls molecular_rate_model.

The full poe check passed locally: 21,507 tests with 1 skipped, 100% coverage, docs built.

🤖 Generated with Claude Code

electronic_static_polarizability (and so ionisation_parameters and the
ionisation rates) and the compact models looked a parent fit up in
fitted_models(), which builds all fifteen fits with their Kramers-Kronig
absorption terms. They now use fitted_model(name). The entry-point test
also checks that the full set of fits is never built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 24, 2026 13:28

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jtravs
jtravs merged commit 30d7efe into main Oct 24, 2026
6 checks passed
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.

2 participants