Eclipse webtools project (WTP) and its performance / quality

后端 未结 11 1357
别那么骄傲
别那么骄傲 2021-01-30 05:01

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 s

相关标签:
11条回答
  • 2021-01-30 05:48

    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.

    0 讨论(0)
  • 2021-01-30 05:50

    Couldn't comment so I will just put my comment in to this answer.

    Have you tried upping Eclipse's memory allocation, I know it used to crash all the time when I used it on Mac OS X awhile ago. There is a config file that has the base RAM allocation in it, once I modified that file and gave it an extra 128 megabytes of memory it behaved better. Not sure if this will affect WTP, I am commenting more in regards to the core Eclipse application itself.

    0 讨论(0)
  • 2021-01-30 05:51

    By far the best way for speeding up my projects has been to precompile code that I am not currently using. We have about 20 projects that make up our system and when working on any specific problem I'm only touching a specific subset of those java files. Compiling most of the code that I won't be touching and throwing it into some .jar's, then using that as the source instead of including the projects has proven to speed up things by quite a bit. I imagine it will help you as well if you have 4k+ files. Each project just has a little build.xml that will make a jar out of it to include.

    As for the mind numbing slowness in the JSP editing. I have the same problems, it's just so dam slow. I don't have many more than 100 jsp files but I have the same issues as you. My solution has just been to throw money at hardware, which I must admit I enjoy doing :P.

    0 讨论(0)
  • 2021-01-30 05:53

    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.

    0 讨论(0)
  • 2021-01-30 05:55

    WTP (3.2.3) is slow for me too. I belive I have found some ways to make it not so slow:

    • We use maven, so there is a target directory which contains a copy of all JSP's and some other XML's. I have recognized that they are sometimes scanned by the WTP validators. But this is not necessary, so I have excluded them from validation (Project/Properties/Validation/XXX/Exclude Group/). (You should be able to gain the same effect when marking the target directory as derived, but that does not work for me some times ;-( )
    • I have made the (not scientifically proven) observation, that WTP seems to be faster with JSPX than JSP files.
    0 讨论(0)
提交回复
热议问题