Files
AFFiNE/packages
DarkSky 5737334704 perf(store): move owned blob bytes into the set_blob query
The set_blob function bound the payload by reference. The sqlx encoder
then copied the full payload into a new buffer.

The function now moves the owned key, data and mime values into the
query arguments. The SQL, the upsert behavior and the public signature
do not change.

A new single-test binary counts Rust heap requests with a global
allocator. It also checks insert, overwrite, soft delete and revive.

For an 8 MiB payload, the old code requested 8,393,257 bytes in one
set_blob call, with one block at or above 1 MiB. The new code stays
below 64 KiB and makes no block at or above 1 MiB.
2026-12-01 13:23:55 +09:00
..