Skip to content
Snippets Groups Projects
  • Erik Johnston's avatar
    f85b6ca4
    Speed up cache size calculation · f85b6ca4
    Erik Johnston authored
    Instead of calculating the size of the cache repeatedly, which can take
    a long time now that it can use a callback, instead cache the size and
    update that on insertion and deletion.
    
    This requires changing the cache descriptors to have two caches, one for
    pending deferreds and the other for the actual values. There's no reason
    to evict from the pending deferreds as they won't take up any more
    memory.
    f85b6ca4
    History
    Speed up cache size calculation
    Erik Johnston authored
    Instead of calculating the size of the cache repeatedly, which can take
    a long time now that it can use a callback, instead cache the size and
    update that on insertion and deletion.
    
    This requires changing the cache descriptors to have two caches, one for
    pending deferreds and the other for the actual values. There's no reason
    to evict from the pending deferreds as they won't take up any more
    memory.