Skip to content
Snippets Groups Projects
Forked from Platform / Development / swh-model
Source project has a limited visibility.
  • Antoine Lambert's avatar
    d6d17dad
    collections: Improve ImmutableDict look up by key performance · d6d17dad
    Antoine Lambert authored
    Previously when looking up data by key in an ImmutableDict, the inner
    tuple storing keys and values was iterated until finding the requested
    key.
    
    This is not really efficient when the ImmutableDict contains a lot of
    entries, typically for an origin snapshot containing a lot of branches.
    
    So use an inner dictionary to speedup look up by key operations and
    improve loader performances.
    d6d17dad
    History
    collections: Improve ImmutableDict look up by key performance
    Antoine Lambert authored
    Previously when looking up data by key in an ImmutableDict, the inner
    tuple storing keys and values was iterated until finding the requested
    key.
    
    This is not really efficient when the ImmutableDict contains a lot of
    entries, typically for an origin snapshot containing a lot of branches.
    
    So use an inner dictionary to speedup look up by key operations and
    improve loader performances.