siom79 / japicmp

Comparison of two versions of a jar archive
https://siom79.github.io/japicmp
Apache License 2.0
712 stars 107 forks source link

Eagerly filter classes #333

Closed zentol closed 2 years ago

zentol commented 2 years ago

Addresses #318.

Reduce the maximum memory requirement of the JarArchiveComparator by having it apply filters while classes are being loaded and removing them from the ClassPool when filtered.

If a package filter is encountered we switch to a 2 step procedure, first reading all package filters, then reloading all classes. (Quite annoying but I don't see an alternative apart from rejecting the PR).

Diff is a bit larger than desired so tests like FilterTest, that relied on filtering to happen after a CtClass is created, continue to work as-is.

siom79 commented 2 years ago

Released with 0.16.0.

Thanks a lot for the contribution.