MerginMaps / MerginMaps/python-api-client
Vacuuming
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 23
- Forks
- 12
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
https://github.com/MerginMaps/python-api-client/blob/master/mergin/utils.py#L99
Vacuuming could be useful even for gpkgs without the -wal sidecar
Vacuuming takes some time, so we should check that it is worth it.
Sources
https://gdal.org/en/stable/drivers/vector/gpkg.html
When dropping a table, or removing records from tables, the space they occupied is not immediately released and kept in the pool of file pages that SQLite may reuse later. If you need to shrink the file to its minimum size, you need to issue an explicit "VACUUM" SQL request.
https://sqlite.org/lang_vacuum.html
When content is deleted from an SQLite database, the content is not usually erased, but rather the space used to hold the content is marked as being available for reuse.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at mergin/utils.py line 99 and read the linked GDAL GeoPackage and SQLite VACUUM guidance. Check how the current logic decides whether vacuuming is worthwhile, including GeoPackages without a -wal sidecar. Done means the decision covers that case without unnecessary vacuuming; validate with the project's existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlite
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100