ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

Optimize the cache

Open pieter-v opened this issue 5 years ago • 1 comments

Our application has a large data set. One use-case includes destroying a large amount of data. Analysing this scenario, I noticed that 20 seconds was spent in Cache.get: 10 seconds in store.get and 10 seconds in store.has. By assuming that the return value never will be undefined (I verified this in the code), then the store.has is not needed. If it is required that the return value of the function should also include undefined. Then this algorithm could be modified to optimise the hits over the misses. By changing the test value !== undefined too value !== undefined || this.store.has(key)

pieter-v avatar Mar 13 '20 14:03 pieter-v

Is this still relevant?

kategengler avatar Dec 12 '23 16:12 kategengler