mirror of
https://github.com/penpot/penpot.git
synced 2026-10-30 06:20:32 +00:00
An automatic snapshot taken by update-file stores the file data bytes as they are, instead of realizing every objects-map and encoding the whole file inside the request. When the data holds objects-maps, the new compact-file-snapshot task, queued in the same transaction, rewrites the snapshot with plain maps later. On the legacy-db backend the snapshot is compacted inline. fsnap/create! runs its writes in its own transaction, so callers that pass only a pool (the restore backup) can queue the task. Whether stored bytes hold objects-maps comes from the decoded data, not from the file features, and compaction leaves pages behind a pointer unloaded.