Project: Explode locations figure export - #762
Draft
tnagorra wants to merge 4 commits into
Draft
Conversation
tnagorra
force-pushed
the
feat/explode-locations-figure-export
branch
from
June 17, 2026 08:56
4ad222f to
c50d909
Compare
- Add metadata in excel download mutation - Add metadata in excel download query
- add mock export generation
tnagorra
force-pushed
the
feat/explode-locations-figure-export
branch
from
June 18, 2026 01:40
c50d909 to
d096d35
Compare
- remove un-necessary tests
tnagorra
force-pushed
the
feat/explode-locations-figure-export
branch
from
June 19, 2026 06:21
d096d35 to
a148d03
Compare
tnagorra
marked this pull request as ready for review
June 19, 2026 06:22
thenav56
approved these changes
Jun 25, 2026
tnagorra
marked this pull request as draft
July 16, 2026 01:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Benchmarked on the dataset with 186,321 figures, comparing the new
explode-by-locations export against the existing regular figure export.
Takeaways
count. Both the read and write paths stream to disk
87 batched per-chunk side queries). Query count scales with chunks, not figures.
Optimizations
locationsArrayAgg on explode.filter(geo_locations__isnull=False).distinct()filter with anExists()semi-joinTogether these cut the explode-specific overhead by ~44% (from +72 s / 15.6%
to +43 s / 9.6% over the regular export)
Known limitation
A full unfiltered export (~8.3 min) runs close to the 10-min Celery task
time_limit. Follow-ups:time_limitxlsxwriterfor faster writesThis PR doesn't introduce any:
printThis PR contains valid: