Eclipse webtools project (WTP) and its performance

2019-03-07 23:23发布

Our company is using eclipse since several years now (we are using WTP since release 0.7)

I am currently evaluating eclipse 3.6.2 with WTP 3.2.3 which should replace eclipse 3.4.2 with WTP 3.0.4 as being our main IDE.

And I have to say that once again I am quite disappointed in concerns of performance:
WTP 3.2.3 seems to be much slower than 3.0.4.
In fact I am really wondering why WTP gets slower with each release.

One of our applications (dynamic web project) contain about 4000 java classes and 700 jsps/jsp fragments. We only need basic WTP functionality for developing jsps, xmls and xsd. We don't need high sophistic features like Dali (should JPA tools really covered by a webtools project?), Libra or a visual xml editor in the first place.

Another interesting point is that WTP seems to slow down the whole IDE. SWT is non-reponsive for some fraction of seconds, cpu usage is very high (especially after a built took place - if you look at the system jobs, several jsp/javascript indexers are doing work for some minutes, even if all WTP build validators have been disabled), opening new files are slower, navigating through the project etc.

This can be especially seen on older machines which do contains only a single core cpu.

The worst thing is that I've got the feeling that the WTP dev team does not care much about performance (e.g. have a look at the http://wiki.eclipse.org/WTP_Performance_Tests page - last update took place in 2008).

Bug reports and Newsgroup posts regarding to performance of basic features (e.g. jsp editing/validating) are often ignored or closed after some time, some examples: here, here, and here.

Quo vadis, WTP?


Please don't get me wrong:

I don't want to blame WTP.
In fact I believe that WTP is a good open-source project developed by a talented team.
But obviously the project has a problem with its quality assurance, especially in terms of performance which affects usability and user acceptance.

I just want to point out that the team should focus on the things which are essential to most of the users in the first place and afterwards work on implementing super-duper-features.

My Questions

  • What are your experiences with WTP, especially the most recent releases?
  • Can you confirm or disprove my observations?
  • Are there better alternatives?
  • Did you switch from or to WTP and why?
  • Do you have some best practices to speed it up, especially for upper-mid-sized like ours?

UPDATE

I'd like to make an update on this question to reflect the current answers and to sum up the current results:

  • Many users complain about more or less on the same issues so I see those issues as confirmed.
    BTW, this question is also mentioned on a news post on theserverside.com with additional comments.

  • The responsible WTP project lead, nitind, made a notable post on the current situation of WTP, which I like to cite:
    "The simple fact is that we don't spend much time on performance tests because we lack resources for doing that."
    "Of course we'd like to be proactive about it rather than reactive, but we tend to allocate our time to functional problems first."

So this question turns a little bit into some kind of an open letter from the community to the WTP team:

Dear WTP team,

it's obvious that WTP is suffering from major quality/performance issues 
which you try to play down or to ignore.
Please invest some time to improve the current situation 
at the cost of new features and do everything what's required 
to solve the current problems.
E.g. revive the performance team, do some regression tests between 
previous releases or ask the community for (precise defined) help.

I am sure that they are enough people willing and able to help here.

If you like, do some kind of poll to get a feeling what should be 
the most important scopes of future's WTP releases.

Please, please, listen to your community.

11条回答
我想做一个坏孩纸
2楼-- · 2019-03-07 23:41

I don't know who's to blame: WTP or JBoss Tools. The fact is that, as I work with GWT (minimal JSP), I went the opposite way: No WTP at all!!! I'm now using plain Eclipse for Java, and use a run configuration to deploy (programatically invoking ANT) and start the server, and I never looked back!!! Eclipse used to take ~1.5GB and crashed several times. Now, it sits on ~800MB, and the whole environment became more stable.

查看更多
在下西门庆
3楼-- · 2019-03-07 23:45

If you need barebones Java EE then you are better off with Netbeans, if you need everything but just working you are better off with IDEA. It is as simple as that.

查看更多
男人必须洒脱
4楼-- · 2019-03-07 23:48

To respond, I'm the lead for the projects that supply the JSP, XML, and JavaScript source editing functionality in WTP. The simple fact is that we don't spend much time on performance tests because we lack resources for doing that. Of course we'd like to be proactive about it rather than reactive, but we tend to allocate our time to functional problems first. We do have an adopter product running performance regression tests regularly, but I expect that tests are run on multi-core machines by now--and we haven't had any new red flags reported to us for some time.

Of the 3 bugs you linked to, 2 predate the 3.0.4 version you laud and the third is either a formatting performance issue (since addressed) or one with as-you-type validation specific to XML files (the fixing of which would have triggered a memory leak in Xerces, iirc, hence us not putting it in at that time). If you have concrete projects that you can attach to a bug and say "doing X is slower in 3.2 by Y amount", we'll do what we can to figure out where there's a regression.

As for the indexers, they should at least eventually complete. The on-disk information that is stored has changed between WTP versions, and those files need to be reprocessed so they're again included in search and (where implemented) refactoring operations. Once the initial indexing is complete, it should act incrementally and be virtually unnoticeable. One architectural change you may be running into is that for JSPs, the entire workspace needs to be indexed in a single workbench session for that index to be considered "up to date". Shutting down Eclipse out of frustration will only prolong the impact of that reprocessing.

It sounds like your company's standard install includes the entirety of WTP rather than rolling your own custom distribution. I urge you to check the Startup and Shutdown preference page and turn off early startup of any functionality you're not interested in using. Nothing you've mentioned interest in makes use of that facility, but there are other areas of WTP and the Platform that do. Anything you're not interested in validating is fair game on the Validation preference page, as well as the setting to validate JSP fragments by default on the Web / JSP Files / Validation preference page.

查看更多
劳资没心,怎么记你
5楼-- · 2019-03-07 23:49

I have seen similar effects, here's one solution that might be suitable in some project environments...

To guarantee fast and responsible Eclipse Web project environment, consider this:

  1. Use Eclipse IDE for Java Developers
    • 98MB version is leaner than 200MB EE version
    • from General / Startup and Shutdown, disable all but "Eclipse UI"
    • from Validation, disable validators which you do not need
    • these probably prevent some performance issues (YMMW)
  2. Use Jetty
    • you do not need WTP or any other plugins, it's pure Java
    • like Tomcat but very quick & simple to install into any IDE / environment
    • embed directly into your project files, configure once for every developer
    • works in any IDE (Eclipse, IDEA, JDeveloper..)
    • start Servlet Container with "Debug As" / "Run As"
    • shutdown Servlet Container by clicking red box on Eclipse console
    • IDE Console, debugging & hot code replacement & JRebel works fine

Result: fast & responsive Eclipse when compared to many other Eclipse installations that use Eclipse EE version with WTP stuff.

Why? It might be that some Eclipse feature or plugin contains bugs or simply uses resources in a bad way and this makes Eclipse UI sluggish.

Non-Java EE Eclipse is good enough even for many Java EE project environments, it all depends on your architecture and what tools you are using..

Here's a quick tutorial to get started in case you wish to try Jetty Servlet Container out with Eclipse. See https://vaadin.com/web/jani/home/-/blogs/vaadin-for-everyone-how-to-get-started . Download VaadinProjectForAnyIDE.zip, it's an Eclipse project. Just ignore that Vaadin stuff and replace HelloWorldApplication.java with your own servlet and edit web.xml accordingly.

One more thing. With Eclipse EE version, you might also wish to try J2EE preview server which actually is Jetty embedded into Eclipse bundle. However, this also uses WTP mechanism.

查看更多
霸刀☆藐视天下
6楼-- · 2019-03-07 23:51

I also think the stability and performance of Eclipse/WTP is somewhat alarming. I'm using Eclipse since mid 2003 and have been trying WTP since its very first releases.

At first the quality was absolute abysmal, but for a 0.x version I couldn't complain of course. While waiting for WTP to mature, I used MyEclipse, which was sort of okay but had its flaws too (and being partially based on WTP, inherited some of WTP).

When MyEclipse became heavier and heavier, slower and slower and we ran into several stability issues, we switched to 'pure WTP'. All we were using was really the basic JSP/JSF editor and deployer.

Since WTP doesn't do incremental deployment (at least not for the JBoss server runtime) we added the separate server runtime from JBoss tools. When we adopted Facelets, we also switched to the editor from JBoss tools.

We do however run into a lot of problems we also had with MyEclipse. There are unexplainable slowdowns, but much worse are various stability problems. There are lots of awkward exceptions and crashes. A typical .log file on many different workstations I examined is chockfull of exceptions. A small selection of the last 10 exceptions in my log:

1.

java.lang.NullPointerException
        at org.eclipse.jst.jsp.core.internal.validation.JSPActionValidator.isElIgnored(JSPActionValidator.java:147)

2.

java.lang.RuntimeException
        at org.eclipse.jface.viewers.ColumnViewer.checkBusy(ColumnViewer.java:763)

3.

java.lang.ArrayIndexOutOfBoundsException: 38
        at org.eclipse.debug.internal.ui.viewers.model.FilterTransform$Node.addFilter(FilterTransform.java:67)

4.

org.eclipse.jdi.TimeoutException: Timeout occurred while waiting for packet 302111.
        at org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply(PacketReceiveManager.java:171)

5.

java.lang.NullPointerException
        at org.eclipse.jst.jsf.facelet.core.internal.cm.ElementCMAdapter.getLength(ElementCMAdapter.java:109)

6.

Caused by: java.lang.NullPointerException
        at org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.WebappConfiguration.getConfigFilesFromContextParam(WebappConfiguration.java:184)

7.

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Feature 'span' not found. (file:///mysystem/Eclipse.app/Contents/MacOS/com
/sun/faces/metadata/taglib/facelets_jsf_core.taglib.xml, 453, 52)
        at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:83)
        ...
        at org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.TagModelLoader.loadFromInputStream(TagModelLoader.java:100)

8.

java.lang.NullPointerException: No IModelProvider exists for project P/my_project of version: Utility Module
            at org.eclipse.jst.j2ee.model.ModelProviderManager.getModelProvider(ModelProviderManager.java:101

9.

 java.lang.NullPointerException
            at org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory.clearCache(J2EEDeployableFactory.java:238)

10.

org.eclipse.jst.jee.model.internal.mergers.ModelException: java.util.ConcurrentModificationException
        at org.eclipse.jst.jee.model.internal.mergers.EjbJarMerger.process(EjbJarMerger.java:79)

Note that these are just the last 10, there are many, many more exceptions.

The casual reaction would be: "Your Eclipse install is corrupted! You have a local problem!" Yes, I might have a local problem, but this "local problem" seems widespread as many Eclipse installs I inspected seem to have this stuff in their logs.

I'm also having problems with deployments like reported at the following link in various incarnations: http://community.jboss.org/thread/158611 It may be JBoss tools specific or it may be based on the underlying WTP or even Eclipse code. I don't know, but I do know it's a nasty problem. Every WTP and JBoss tools version there is 'something' fixed, and every version a problem like that resurfaces in a slightly different form.

Between the stability problems I'm able to get some work done and I love the auto completion and navigate-into features the editors offer me (which keeps me from switching to a text editor and building completely on the command line), but I sure would love some increased stability.

查看更多
登录 后发表回答