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 in code we have functions that work with a lot of data (e.g. events - groupEventsByExecutionEnv) which are called multiple times per execution. Most of the time this functions are called with the same data leading to duplicated computations.
Currently in code we have functions that work with a lot of data (e.g. events -
groupEventsByExecutionEnv
) which are called multiple times per execution. Most of the time this functions are called with the same data leading to duplicated computations.It would be nice to memoize the return values for specific call parameters. This can be done via
Map
, preferably aWeakMap
to keep GC working properly.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
The most preferable approach would be to make general
memoize
util function which works for any function.The text was updated successfully, but these errors were encountered: