These are chat archives for marc-costello/evt

8th
Jun 2015
Marc Costello
@marc-costello
Jun 08 2015 19:03 UTC
Reckon it's worth doing some performance tests against each cache to see how costly the object (using map/reduce) vs array lookups are?
@richarddowson
Actually theres little point really. The array will be a stupid amount faster. I guess the question is, what benefit do we get from the object method, and is it worth it?
richarddowson
@richarddowson
Jun 08 2015 21:40 UTC
It comes down to how to structure the object. Would it be an object per element token, with a collection of events, each event with a collection of handlers? That would be faster to get all the events for one element, but no good to get all the events for one namespace. Reality is that so long as we don't expose the actual data structure and provide suitable methods on the cache then we can swap it out at will if we feel the need.
Marc Costello
@marc-costello
Jun 08 2015 21:50 UTC
Yea that's true. I've started to build the cache. I'll put a pull in tomorrow when I get time