Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better filestack performance #614

Merged
merged 25 commits into from
Mar 24, 2024
Merged

better filestack performance #614

merged 25 commits into from
Mar 24, 2024

Conversation

rafaqz
Copy link
Owner

@rafaqz rafaqz commented Mar 19, 2024

This PR overhauls both stack load and compile time. It uses type-unstable vectors for as long as possible at load to avoid compiling lots of functions on huge tuples.

The 130 layer stack in the tests now takes ~6 seconds to load the first time, and 0.5 seconds after that. getindex after using open is now essentially the same as using NCDatasets or GRIBDatasets directly.

We should encourage using open(st) do st blocks as much as possible for lazy=true stacks, its much faster now.

Closes #226

(Sorry this took 2 years @maxfreu 😅 )

@rafaqz rafaqz closed this Mar 24, 2024
@rafaqz rafaqz reopened this Mar 24, 2024
Copy link

codecov bot commented Mar 24, 2024

Codecov Report

Attention: Patch coverage is 86.25954% with 36 lines in your changes are missing coverage. Please review.

Project coverage is 81.34%. Comparing base (6c4735d) to head (849bf96).
Report is 1 commits behind head on main.

Files Patch % Lines
src/sources/commondatamodel.jl 85.71% 13 Missing ⚠️
ext/RastersHDF5Ext/smap_source.jl 0.00% 10 Missing ⚠️
src/stack.jl 92.42% 5 Missing ⚠️
src/sources/sources.jl 66.66% 4 Missing ⚠️
ext/RastersArchGDALExt/gdal_source.jl 90.00% 1 Missing ⚠️
src/array.jl 95.23% 1 Missing ⚠️
src/filestack.jl 80.00% 1 Missing ⚠️
src/sources/grd.jl 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #614      +/-   ##
==========================================
- Coverage   81.49%   81.34%   -0.16%     
==========================================
  Files          61       61              
  Lines        4270     4337      +67     
==========================================
+ Hits         3480     3528      +48     
- Misses        790      809      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rafaqz rafaqz merged commit 7ab31df into main Mar 24, 2024
6 of 7 checks passed
@rafaqz rafaqz deleted the stack_performance branch March 24, 2024 23:12
@maxfreu
Copy link
Contributor

maxfreu commented Mar 25, 2024

Thanks for improving this! But you shouldn't work so long on Sundays ;-)

@rafaqz
Copy link
Owner Author

rafaqz commented Mar 25, 2024

Not to worry, github tells me I have enjoyed eleven entire, healthy, commit-free Sundays in just the last year alone!

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.

Polynomial RasterStack creation time
2 participants