In FieldRegistryPopulation 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.
In FieldRegistryPopulation 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.