graph-node icon indicating copy to clipboard operation
graph-node copied to clipboard

Improve memory efficiency of `EntityCache`

Open lutter opened this issue 3 years ago • 0 comments

This PR makes the EntityCache more memory efficient, meaning the same amount of memory will be able to store more entities with two changes:

  • Use Word (Box<str>) for entity types and ids
  • Remove the subgraph id from EntityKey since that adds an overhead of 70 bytes for every cache entry

lutter avatar May 25 '22 23:05 lutter