You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the cache in HashList is grown one element at a time - this leads to a lot of reallocation and re-hashing work when adding multiple items to the list, which is pretty common - common enough that I can see it coming up when measuring with a profiler.
There are lots of ways to grow lists with different tradeoffs in terms of memory use vs reallocation - based on gut feeling alone, I'd grow it 16 items at a time instead of 1 which likely would fix things for the practical use cases that we have.
The text was updated successfully, but these errors were encountered:
actually, that might be the answer here: a lazy strategy for growing the cache - we don't need the cache until someone asks for a root that is affected by the new entry - queries for all old entries can be routed to the old cache while cache-growing can be delayed until a root affected by the new entries is needed
Currently, the cache in
HashList
is grown one element at a time - this leads to a lot of reallocation and re-hashing work when adding multiple items to the list, which is pretty common - common enough that I can see it coming up when measuring with a profiler.There are lots of ways to grow lists with different tradeoffs in terms of memory use vs reallocation - based on gut feeling alone, I'd grow it 16 items at a time instead of 1 which likely would fix things for the practical use cases that we have.
The text was updated successfully, but these errors were encountered: