-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[performance] optimized ClasspathDirectory #3433
Conversation
* java.io.File.list() returns null if the file is not a directory, so File.isDirectory() is not needed. * use ConcurrentHashMap instead of Hashtable * avoid rawtypes ClasspathDirectory.directoryList(String) is a hotspot for example during NullTypeAnnotationTest
@@ -360,7 +358,7 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { | |||
@Override | |||
public void reset() { | |||
super.reset(); | |||
this.directoryCache = new Hashtable(11); | |||
this.directoryCache.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why teh secondaryTypes are not cleared?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also wondered about that. i decided to only make a performance change here keeping logic as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do
f99d971
to
9c059ca
Compare
@jukzi There is an issue in this code: raised issue #3445 for the same. Thanks |
ClasspathDirectory.directoryList(String) is a hotspot for example during NullTypeAnnotationTest