-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Extensive performance issues with Lombok and STS/Eclipse #1717
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
Comments
Is someone working on this issue or do you need more information? Just let me know if I can support you somehow! I tried it today again with Lombok 1.18.2 and I still have the same performance issue. I even tried to add Lombok to the project and also defined one |
In our project we have Lombok in use. One colleague had extreme performance problems. After typeing 2 characters, we had to wait several seconds. After taking several threaddumps, I realized how to fix his computer. 1. Disable Lombok ConfigurationThere is a configuration possibility, which I have seen in LombokConfiguration. If you do not have a lombok.config file, then you can disable eclipse from searching of it. Just define -Dlombok.disableConfig=true as JVM argument, and its gone. Eclipse will not look for the config on every key press. One recommendation could be for the lombok developer: it would be good to cache all lombok.config files in the memory. Then you would just need to subscribe somehow to get notified about new lombok.config files or about updates to them. This way the config would not be searched on every key press. 2. Close the Help ViewWe kept on seeing such things in Stacktrace:
The bad part is that obviously the Help View updates its content completely in UI thread (see the stack frame at org.eclipse.help.ui.internal.views.HelpView.updateActivePart(HelpView.java:198). In case of Java Editors the content sensitive view needs a compiled java file, and this compilation takes place in UI Thread. Combined with the processing from Lombok and its uncached config file this is a fatal performance issue. I will file a bug report to Eclipse Project to have Help View probably fixed. After fixing both issues by my colleague eclipse became completely responsive again. If this does not fix your case, please take stacktraces, when eclipse hangs, and attach here. This could help the investigation. |
Eclipse issue is opened: https://bugs.eclipse.org/bugs/show_bug.cgi?id=539840 . Lets see if it will be fixed :) |
@liptga I think the issue you were experiencing is different than from the originally reported one which seems to be related to TransformEclipseAST - but anyway; I've tried Right now the only workaround I know around this problem is do disable lombok completely (by removing the javaagent from eclipse.ini). If anyone would like to look into the issue; there are some generated classes in Hive which are affected; here are the steps to use it to repro the ssue:
|
@kgyrtkirk Zoltan, do you have the help view opened? If not, then the thing that would help is really just taking threaddumps, and attaching to this issue. Then the investigation would be surely faster. Could you please attach some threaddumps? |
Please attach a complete threaddump of a "blackout" of your eclipse. What you attached, shows only that lombok does something. The interesting part would be who calls lombok. How to make a thread dump: |
I also encountered slowness ... and as a matter of chance, it was also after opening some hive source module in my eclipse! |
In our team we've got extensive performance issues using lombok in STS for one of our projects. We've got several smaller projects (more or less libraries) where we are using lombok and one really big project (Java EE application) where we don't use lombok up to now. The performance issues only exists in this big project where we don't use lombok. It looks like the code assist is really slow, but we even tried to disable it and typing is still very slow. STS hangs after typing a few letters for a few seconds. This makes it nearly impossible for us to continue development.
As a workaround we will open the big project in a separate STS instance without the Lombok agent.
We are using different STS versions in our team, I know that some colleagues have 3.8.x, I have 3.9.4.
My version 3.9.4 is based on Eclipse Neon.3 (4.6.3).
I tried it with the lombok version 1.18.0 that was released today. Java version 1.8.0u111.
This is the list of detected "hot spots" using YourKit profiler:
I also attached an export about all method invocations:
lombok_performance-issue-with-sts.xlsx
If you like I can also provide the YourKit dump or let me know what I should trace. Unfortunately the project is closed source and thus I can't provide you a link so that you can try it yourself.
Maybe this issue is related to #749.
Anyway: Thanks for thousands of lines of boilerplate we don't needed to write! We are really looking forward to be able to use Lombok in all our projects.
The text was updated successfully, but these errors were encountered: