Skip to content

Small performance improvements and memory leak fix#49

Closed
leuty wants to merge 10 commits intoMeteoSwiss-APN:mainfrom
leuty:perf/cache-topography-netcdf
Closed

Small performance improvements and memory leak fix#49
leuty wants to merge 10 commits intoMeteoSwiss-APN:mainfrom
leuty:perf/cache-topography-netcdf

Conversation

@leuty
Copy link
Copy Markdown
Contributor

@leuty leuty commented Apr 9, 2026

This PR reduces redundant I/O and computation across the plotting pipelines. The topography NetCDF data is now cached so it is read from disk only once rather than re-loaded for every subplot. Similarly, ATAB file parsing is cached across pipelines, and the files themselves are only read from disk a single time.

On the plotting side, a redundant tight_layout=True was dropped from the station scores subplot initialization since an explicit fig.tight_layout(...) with custom parameters is already called immediately after. s.

Unused imports were cleaned up as well.

I did not do any benchmarking, but staring at the logs seemed like the patches help a bit.

The PR is best reviewed commit-by-commit.

@leuty leuty force-pushed the perf/cache-topography-netcdf branch from cdae9dd to 21d473f Compare April 9, 2026 16:17
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.

1 participant