Page MenuHomeSoftware Heritage

swh-graph: refactor algo implementations to not forcibly memoize results
Closed, MigratedEdits Locked

Description

The backend implementation of the various algorithms (algo.* namespace) uses the patter of computing algo results in the constructor, memoizing results in the instance forever, and returning them upon get().

We should revisit that to make it more functional and stateless. Doing so would be less surprising in terms of resource usage and also allow for more code reuse across endpoint implementations