-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize field registry population mechanism by parsing each source f…
…ile only once (#230) In [FieldRegistryPopulation](https://github.com/ucr-riple/NullAwayAnnotator/blob/6c17b8bccb08517f5ce3249d3285405ceeb47748/annotator-core/src/main/java/edu/ucr/cs/riple/core/registries/field/FieldRegistry.java#L97) we process a single compilation unit tree multiple times as this method receives a pair of a class flat name and a path to source file containing that class, hence, for compilation unit trees that contains multiple classes, inner classes and anonymous classes we parse the same source file multiple times. This PR updates this mechanism by caching the latest parsed source file. This optimization is according to the assumption that Scanner visits all classes within a single compilation unit tree consecutively.
- Loading branch information
1 parent
6c17b8b
commit 2229914
Showing
1 changed file
with
60 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters