limbo/core/storage
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
..
btree.rs Merge 'btree: Coalesce free blocks in page_free_array()' from Mohamed Hossam 2025-05-12 16:52:11 +03:00
buffer_pool.rs core: Move buffer_pool.rs to storage module 2024-08-01 11:53:14 +03:00
database.rs Fix dumb clippy errors 2025-04-13 11:10:06 -03:00
mod.rs Minor improvements and cleanups in btree 2025-03-01 15:48:42 -05:00
page_cache.rs Request load page on insert_into_page 2025-04-02 16:24:53 +02:00
pager.rs fix some issues about page_size 2025-04-28 16:13:07 +08:00
sqlite3_ondisk.rs Merge 'Add PRAGMA schema_version' from Anton Harniakou 2025-05-01 10:50:02 +03:00
wal.rs fix some issues about page_size 2025-04-28 16:13:07 +08:00