fasten-project / fasten

Analyse package dependency networks at the call graph level
https://www.fasten-project.eu
Apache License 2.0
86 stars 28 forks source link

Use lazy fetch in `MavenResolverIO` when reading POMs from the DB #472

Closed mir-am closed 2 years ago

mir-am commented 2 years ago

Description

Specifically, this PR makes the following changes:

Motivation and context

As described in #471, the Java REST API currently crashes due to OOM, which is caused by reading all package versions' metadata into memory. This should be done lazily, i.e., one by one.

Testing

Tested with the DC and within the IDE. Also, with this fix, in production, the Java REST API is now responsive and the OOM exception does not occur.