Skip to content

Memoize computationally expensive calls #43

@FranjoMindek

Description

@FranjoMindek

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 a WeakMap 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions