Skip to content

Reduce number of alias for tiles to a strict minimum#82

Merged
benoit74 merged 1 commit intomainfrom
remove_dedup
Mar 31, 2026
Merged

Reduce number of alias for tiles to a strict minimum#82
benoit74 merged 1 commit intomainfrom
remove_dedup

Conversation

@benoit74
Copy link
Copy Markdown
Collaborator

@benoit74 benoit74 commented Mar 31, 2026

Fix #78

Former logic:

  • always store real data at dedupl/{self._dedupl_helper_path(dedup_id)}
  • add aliases for each tile from tiles/{z}/{x}/{y}.pbf to proper dedupl/{self._dedupl_helper_path(dedup_id)}

New logic:

  • add first tile found for a given data at its natural path tiles/{z}/{x}/{y}.pbf
  • add an alias for next tile using same data to first tile found path

For https://farm.openzim.org/recipes/maps_en_monaco it should for instance allow to move from 4595 article entry + 5596 alias (10191 entries) to 4595 article entries + 1001 alias (5596 entries), i.e. 45% reduction.

@benoit74 benoit74 self-assigned this Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 12.50000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.20%. Comparing base (ae3866d) to head (517c2ef).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
scraper/src/maps2zim/processor.py 12.50% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #82      +/-   ##
==========================================
+ Coverage   32.14%   32.20%   +0.05%     
==========================================
  Files          11       11              
  Lines         983      975       -8     
  Branches      132      132              
==========================================
- Hits          316      314       -2     
+ Misses        656      650       -6     
  Partials       11       11              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@benoit74 benoit74 merged commit 0119431 into main Mar 31, 2026
10 checks passed
@benoit74 benoit74 deleted the remove_dedup branch March 31, 2026 15:47
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.

Do not create aliases when unneeded

1 participant