-
-
Notifications
You must be signed in to change notification settings - Fork 351
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: cache URLs of sourceClasspath #990
Conversation
It looks like build engine (Travis) is ill... |
what's the reason, the call to |
toURI().toURL() is not my code. It was there before. So I do not know. I know that in java 4,5,6 theref was different behavior in file to url conversion. May be author solved that problem... |
what about removing field |
good idea. I will try it. I have noticed that instance of ClassLoader returned by ClassLoader getInputClassLoader() is not cached too, Normaly it is not ok to create new class loader fot each java class, but I have not analyzed yet, how it is used in spoon. May be it is intentional here. I measured no performance change with cached class loader. |
If I correctly remember |
- to make the loaded classes compatible - to make spoon faster (creation of class loader and classpath URLs for each runtime class access is slow
7876e39
to
b44dfee
Compare
I have checked how
See the new The call of setSourceClasspath resets the inputClassLoader cache so the new class loader is created when needed first time. |
thanks! |
This PR improves performance of MainTest.testMain() test on MS Windows 10 to 50% of origin time. From 45s to 22s.