Skip to content

Conversation

@abyrd
Copy link
Member

@abyrd abyrd commented Dec 5, 2025

Prepares regional result geotiff zip files in a blocking endpoint. These were previously prepared in a background task action because the process was very slow.

This PR reverses PR #938 which is hopefully no longer necessary after PR #986. I have tested this endpoint on smaller regional results (32k origins) but we should test it with much larger areas to ensure it's still reasonably fast.

The code does not take extra measures to prevent simultaneous requests for the same results, as this should not happen in usual operation from a web UI, and most actions taken are idempotent so the only expected side effect is wasted compute (and maybe exceptions from threads trying set files read-only while other threads are replacing them).

abyrd and others added 3 commits December 5, 2025 16:44
Previously prepared in background task action because it was very slow.
Reverses r5 PR #938 which is hopefully no longer necessary after PR #986
log messages to assist in determining cause of slow file creation
@abyrd
Copy link
Member Author

abyrd commented Dec 8, 2025

@ansoncfit reports that on staging, fetching all GeoTiffs for regional analysis 63ab193ac84e4152d58fbb25 (~536k origins x 5 cutoffs x 5 percentiles) takes ~13 seconds to prepare, which is still too slow for a synchronous fetch. Interestingly running locally on exactly the same result grids, it takes only 3 seconds. I've added some logging to identify where the differences may lie when running on the staging environment.

@abyrd
Copy link
Member Author

abyrd commented Dec 8, 2025

On staging, I observed producing the same GeoTiffs take 27 seconds, while zipping them and uploading to s3 took 300 and 400 msec respectively. It appears that only the read-intensive part of the operation is about 10x slower.

@abyrd abyrd marked this pull request as draft December 10, 2025 17:50
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.

3 participants