Files
turso/core
Jussi Saurio 2b6b09d435 Merge 'btree: Coalesce free blocks in page_free_array()' from Mohamed Hossam
Coalesce adjacent free blocks during `page_free_array()` in
`core/storage/btree`.
Instead of immediately passing free cells to `free_cell_range()`, buffer
up to 10 free cells and try to merge adjacent free blocks. Break on the
first merge to avoid time complexity, `free_cell_range()` coalesces
blocks afterwards anyways. This follows SQLite's [`pageFreeArray()`](htt
ps://github.com/sqlite/sqlite/blob/d7324103b196c572a98724a5658970b4000b8
c39/src/btree.c#L7729) implementation.
Removed this TODO:
```rust
fn page_free_array( . . )
    .
    .
    // TODO: implement fancy smart free block coalescing procedure instead of dumb free to
    // then defragment
```

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #1448
2025-05-12 16:52:11 +03:00
..
2025-05-10 22:23:01 -03:00
2025-03-25 17:13:31 +02:00
2025-04-23 08:34:58 -03:00
2025-05-10 22:23:01 -03:00
2025-03-27 17:53:02 +01:00
2025-01-28 14:55:38 -05:00
2025-04-24 11:05:21 +03:00
2025-01-28 14:55:38 -05:00
2025-04-23 10:13:32 -03:00
wip
2025-03-29 22:02:49 +01:00
2024-12-24 18:04:30 +01:00
2025-05-08 22:26:50 +08:00