pijul nest
guest [sign in]

Do not copy the root page if there is only one root page

pmeunier
Oct 13, 2024, 9:04 AM
OXJ5MJBFPGBTS7KX4HAEYLXQOT4ETFR2KNG6FACXZDTJKEUBC7MAC

Dependencies

  • [2] E4MD6T3L Proofreading and commenting of this crate (massive bug fixes included)
  • [3] W2MIZD5B Single file databases + CRC for the root pages (checking the other pages makes everything very slow)
  • [4] OP6SVMOD Resetting history

Change contents

  • replacement in sanakirja/src/environment/muttxn.rs at line 185
    [2.10164][2.10164:10261]()
    std::ptr::copy_nonoverlapping(page_ptr.add(8), next_page_ptr.add(8), PAGE_SIZE - 8);
    [2.10164]
    [3.3051]
    // Iff n_roots == 1 when creating the environment, the two pointers are equal.
    if page_ptr != next_page_ptr {
    std::ptr::copy_nonoverlapping(page_ptr.add(8), next_page_ptr.add(8), PAGE_SIZE - 8);
    }