lahodaj commented on a change in pull request #1890: [NETBEANS-3693] Create
only one instance of javac
URL: https://github.com/apache/netbeans/pull/1890#discussion_r369104253
##########
File path:
java/java.source.base/src/org/netbeans/modules/java/source/parsing/JavacParser.java
##########
@@ -209,11 +210,16 @@
private ChangeListener weakCpListener;
//Current source for parse optmalization of task with no Source (identity)
private Reference<JavaSource> currentSource;
+ //cache of already parsed files
+ static private Map<String, CompilationUnitTree> parsedTrees;
Review comment:
Declaring a static map generally provokes various questions (like when is
the map cleared, what is the threading (although that one is much smaller issue
here), etc.). In general, it is better to avoid static maps like this. I would
suggest to try to move the map into the CompilationInfoImpl (as an instance
field) - then its lifecycle would be much clearer.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists