Skip to content
  • Lennart Poettering's avatar
    journal: introduce entry array chain cache · a4bcff5b
    Lennart Poettering authored
    When traversing entry array chains for a bisection or for retrieving an
    item by index we previously always started at the beginning of the
    chain. Since we tend to look at the same chains repeatedly, let's cache
    where we have been the last time, and maybe we can skip ahead with this
    the next time.
    
    This turns most bisections and index lookups from O(log(n)*log(n)) into
    O(log(n)). More importantly however, we seek around on disk much less,
    which is good to reduce buffer cache and seek times on rotational disks.
    a4bcff5b