Community
Participate
Working Groups
Created attachment 230001 [details] Profiling stats noticed on Jetty thread On simple actions on Eclipse like right-click on PE or opening of editors, I can see the Jetty thread running in the background (as revealed by some profiling). I've attached the thread trace that I see during profiling Is there a way to disable the Jetty jobs from running ?
There should not be a Jetty job out of the box. Can you check who creates/uses the job?
Jetty is used for help content so I think this is completely normal. The attached trace shows that the thread is idle for all of the time. You need to look at CPU time rather than elapsed time because idle threads have negligible impact on performance.
Created attachment 230206 [details] profiling stats for a right-click context menu operation
The profiler stats (as attached in the previous comment) show that the actual operation (running on the main thread) takes much lesser time than the time spent in the Jetty thread. I hope I've read these stats alright, let me know if I've missed something It indeed looks like these threads have been started by the Eclipse help engine (JettyHelpServer class). If so, I have a couple of questions - 1) How was this managed earlier in Eclipse 3.6.x, where I don't see traces of Jetty threads at all ? 2) I've disabled all the information centers listed @ Window>Preferences>Help>Content - I see that this doesn't turn the Jetty threads off. Can I control this via any preference option ?
I spent a bit of time today running the profiler on the base Eclipse SDK today. I am not able to see a Jetty-related job appearing at all when profiling basic operations like context menus, open/closing editors, etc. I wonder if what you are seeing is even related to Eclipse's use of Jetty or whether your product might be doing something else with Jetty here? Steps to reproduce with Eclipse SDK are needed here. I have also answered your questions: (In reply to comment #4) > 1) How was this managed earlier in Eclipse 3.6.x, where I don't see traces > of Jetty threads at all ? Eclipse 3.6 also used Jetty in exactly the same way. The Jetty version has changed and the package names for Jetty also changed, but otherwise it is similar. > 2) I've disabled all the information centers listed @ > Window>Preferences>Help>Content - I see that this doesn't turn the Jetty > threads off. Can I control this via any preference option ? That preference is unrelated. Jetty is also used for rending things like hover help in the editor, which is unrelated to whether you have any help systems connected. There is no global way to "turn off Jetty".
Alright, I did spend some time debugging through the lifecyle of these threads & the JettyServer is indeed started by one of our product plugins that I was completely unaware of. Sorry about this Having said that, although started by our product, when it does run, it seems to consume a lot of CPU. Can you programmatic-ally invoke it via any of your plugin startup & validate this? There may indeed be a valid case of starting Jetty & we don't want our performance to be hampered because of this.
Jetty is a very high performance web server. If it is consuming lots of CPU it means it is serving lots of requests and/or doing lots of I/O as a result of those requests. I am certain that simply starting jetty and having an idle Jetty server has very minimal impact. We do start jetty in our help system, and as I said this is not showing up at all in profiling of the Eclipse SDK. Jetty has extensive logging that you can enable to diagnose your problem further: http://wiki.eclipse.org/Jetty/Tutorial/RequestLog