Files
spacedrive/core/tests
Jamie Pine e053bf233e Build the file type registry once, not once per arena insert
Rebuilding a replica's arena from a delivered database adds rows one at a
time through Arena::add_entry, and that method built a FileTypeRegistry per
call. Building one parses every built-in definition: 92 KB of TOML across
15 files and 349 types, about 3 ms. That was the whole cost of an insert.

Titan spent about 57 minutes rebuilding the Mac's 1.76M-entry home source
after each transfer. The database was never the problem: the full join scan
is 3 s, and one 2,000 row page is 7 ms against an optimal plan.

The built-in set never changes after startup, so one instance serves the
process. 20,000 inserts drop from 60 s to 143 ms, 3.00 ms to 7.2 µs each,
which puts that rebuild near 13 s in a debug build. The batch path built one
per batch and now shares the same instance.

core/tests/arena_insert_cost.rs fails if an insert starts rebuilding it.
2026-09-19 21:54:59 -07:00
..
2026-09-18 01:10:39 -07:00
2026-01-24 16:14:21 -08:00
2026-01-24 16:14:21 -08:00
2025-12-03 15:56:27 -08:00
2025-10-18 10:33:20 -07:00
2025-10-11 13:14:01 -07:00
2026-01-24 16:14:21 -08:00
2025-09-07 01:44:02 -04:00
2026-01-24 16:14:21 -08:00
2026-09-18 01:10:39 -07:00
2026-01-24 16:14:21 -08:00
2026-01-24 16:14:21 -08:00
2026-01-24 16:14:21 -08:00
2026-09-18 01:10:39 -07:00