MerginMaps / MerginMaps/python-api-client
Vacuuming
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 23
- 分支
- 12
- 平均合併
- 2 天 13 小時
- 30 天內合併 PR
- 7
描述
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.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 mergin/utils.py 第 99 行開始,閱讀連結的 GDAL GeoPackage 和 SQLite VACUUM 指南。檢查目前的邏輯如何判斷是否值得執行 VACUUM,包括沒有 -wal 伴隨檔案的 GeoPackages。完成的標準是該判斷涵蓋這種情況,且不會進行不必要的 VACUUM;使用專案現有的測試進行驗證。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python, sqlite
- 領域
- databases
- Issue 類型
- 功能
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 活躍
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100