programing

Eclipse Webtools 프로젝트 (WTP) 및 성능 / 품질

sourcetip 2021. 1. 15. 20:26
반응형

Eclipse Webtools 프로젝트 (WTP) 및 성능 / 품질


우리 회사는 현재 몇 년 동안 이클립스를 사용하고 있습니다 (우리는 릴리스 0.7부터 WTP를 사용하고 있습니다)

나는 현재 eclipse 3.6.2를 WTP 3.2.3으로 평가하고 있는데, eclipse 3.4.2를 WTP 3.0.4로 대체해야합니다.

그리고 다시 한 번 성능 문제에 상당히 실망하고 있습니다.
WTP 3.2.3은 3.0.4보다 훨씬 느린 것 같습니다.
사실 WTP가 각 릴리스에서 왜 느려지는지 정말 궁금합니다.

애플리케이션 중 하나 (동적 웹 프로젝트)에는 약 4000 개의 Java 클래스와 700 개의 jsps / jsp 조각이 포함되어 있습니다. jsps, xml 및 xsd를 개발하기 위해서는 기본적인 WTP 기능 만 필요합니다. Dali (JPA 도구가 실제로 webtools 프로젝트에서 다루어야 하는가?), Libra 또는 시각적 XML 편집기 와 같은 고도의 정교한 기능이 필요하지 않습니다 .

또 다른 흥미로운 점은 WTP 가 전체 IDE느리게하는 것 같다는 것 입니다. SWT는 몇 초 동안 반응하지 않고 CPU 사용량이 매우 높습니다 (특히 빌드가 발생한 후-시스템 작업을 보면 모든 WTP 빌드 유효성 검사기가 있더라도 몇 분 동안 여러 jsp / javascript 인덱서가 작업을 수행합니다.) 비활성화 됨) 새 파일을 여는 속도가 느려지고 프로젝트 탐색 등이 느려집니다.

이것은 특히 단일 코어 CPU 만 포함하는 구형 시스템에서 볼 수 있습니다.

최악의 점은 WTP 개발 팀이 성능에 크게 신경 쓰지 않는다는 느낌이 든다는 것입니다 (예 : http://wiki.eclipse.org/WTP_Performance_Tests 페이지-마지막 업데이트가 2008 년에 수행됨).

버그 보고서 및 기본 기능의 성능에 관한 뉴스 그룹 게시물 (예 : JSP 편집 / 검증) 종종 잠시 후 무시되거나 폐쇄, 몇 가지 예 : 여기 , 여기 , 여기 .

Quo vadis, WTP?


오해하지 마십시오.

WTP를 비난하고 싶지 않습니다.
사실 저는 WTP가 재능있는 팀이 개발 한 좋은 오픈 소스 프로젝트라고 믿습니다.
그러나 프로젝트는 특히 유용성과 사용자 수용에 영향을 미치는 성능 측면에서 품질 보증에 문제가 있습니다.

저는 팀이 애초에 대부분의 사용자에게 필수적인 것에 초점을 맞추고 그 후에는 슈퍼 듀퍼 기능을 구현하는 작업에 집중해야한다는 점을 지적하고 싶습니다 .

내 질문

  • WTP, 특히 최신 릴리스에 대한 경험은 무엇입니까?
  • 내 관찰을 확인하거나 반증 할 수 있습니까?
  • 더 나은 대안이 있습니까?
  • WTP에서 또는 WTP로 전환 했습니까? 그 이유는 무엇입니까?
  • 속도를 높이기위한 몇 가지 모범 사례, 특히 우리와 같은 중상급의 경우가 있습니까?

최신 정보

현재 답변을 반영하고 현재 결과를 요약하기 위해이 질문에 대한 업데이트를 만들고 싶습니다.

  • 많은 사용자가 동일한 문제에 대해 다소 불만을 제기하므로 해당 문제가 확인 된 것으로 보입니다.
    BTW,이 질문은 추가 의견과 함께 theserverside.com 의 뉴스 게시물 에서도 언급됩니다 .

  • 책임감있는 WTP 프로젝트 책임자 인 nitind는 WTP의 현재 상황에 대해 주목할만한 게시물을 올렸습니다.
    "간단한 사실은 우리가 수행 할 리소스가 부족하기 때문에 성능 테스트에 많은 시간을 할애하지 않는다는 것입니다."
    "물론 우리는 사후 대응보다는 사전에 대처하고 싶지만 먼저 기능 문제에 시간을 할당하는 경향이 있습니다."

따라서이 질문은 커뮤니티에서 WTP 팀에 보내는 일종의 공개 서한으로 약간 바뀝니다.

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.

이에 대응하기 위해 저는 WTP에서 JSP, XML 및 JavaScript 소스 편집 기능을 제공하는 프로젝트의 리더입니다. 간단한 사실은 성능 테스트에 필요한 리소스가 부족하기 때문에 성능 테스트에 많은 시간을 소비하지 않는다는 것입니다. 물론 우리는 사후 대응보다는 사전에 대처하고 싶지만 먼저 기능적 문제에 시간을 할당하는 경향이 있습니다. 성능 회귀 테스트를 정기적으로 실행하는 채택 자 제품이 있지만 지금까지는 멀티 코어 컴퓨터에서 테스트가 실행될 것으로 예상하며 한동안 새로운 위험 신호가보고되지 않았습니다.

당신이 연결 한 3 개의 버그 중 2 개는 당신이 칭찬 한 3.0.4 버전보다 이전이고, 세 번째는 포맷 성능 문제 (해결 이후)이거나 XML 파일에 특정한 사용자 유형 유효성 검사 (수정하면 Xerces, iirc에서 메모리 누수가 발생하여 그 당시에는 넣지 않았습니다). 버그에 첨부 할 수있는 구체적인 프로젝트가 있고 "X를 수행하는 것이 Y 양만큼 3.2에서 느립니다"라고 말할 수있는 경우, 회귀가있는 곳을 파악하기 위해 할 수있는 일을 할 것입니다.

인덱서의 경우 적어도 결국 완료 되어야합니다 . 저장된 온 디스크 정보는 WTP 버전간에 변경되었으며 이러한 파일은 검색 및 (구현 된 경우) 리팩토링 작업에 다시 포함되도록 다시 처리해야합니다. 초기 인덱싱이 완료되면 점진적으로 작동하고 사실상 눈에 띄지 않게됩니다. 한 가지 아키텍처 변경 사항은 JSP의 경우 해당 인덱스가 "최신"으로 간주 되려면 전체 작업 영역이 단일 워크 벤치 세션에 인덱싱되어야한다는 것입니다. 좌절감에서 Eclipse를 종료하면 재 처리의 영향 만 연장됩니다.

회사의 표준 설치에는 사용자 지정 배포를 롤링하는 대신 WTP 전체가 포함되어있는 것 같습니다. 시작 및 종료 기본 설정 페이지 를 확인하고 사용하고 싶지 않은 기능의 조기 시작을 해제하시기 바랍니다. 관심이 있다고 언급 한 것은 해당 시설을 사용하지 않지만 WTP 및 플랫폼의 다른 영역이 있습니다. 유효성 검사에 관심이없는 것은 유효성 검사 기본 설정 페이지에서 공정한 게임이며 / JSP 파일 / 검사 기본 설정 페이지 에서 기본적으로 JSP 조각을 유효성 검사하는 설정입니다.


여기에서도 WTP 3.2.3과 동일한 문제가 있습니다. 우리는 몇 년 동안 우리 제품에서도 그것을 사용하지만,이 도구에 대한 우리의 개발자와 고객의 수용은 모든 새로운 릴리스에서 더 느리고 느리기 때문에 매년 감소하고 있습니다.

모든 "고급"기능을 비활성화 할 수있는 경우 사용하고 싶지만 언급했듯이 인덱서를 전혀 비활성화 할 수 없습니다. 또한 이미 실행중인 JSP 파일의 유효성 검사기를 중지 할 수 없습니다 (현재 보유하고있는 파일 수가 많고 프로젝트에 약 1000 개의 JSP 파일과 많은 태그 파일이있는 경우이를 테스트 할 수 있습니다).

나는 또한 기억력을 늘리는 것이 도움이되지 않는다는 것을 증명할 수 있습니다. 전체 일식의 충돌 만 방지 할뿐 WTP의 내부 작업을 차단하는 UI를 줄이지 않습니다.

최신 버전 3.2.3 에서는 서버보기 내에서 Tomcat시작할 때 많은 중단이 발생했습니다 . UI는 바로 중단 에 대한 일분 . 문제가있는 것은 나뿐만 아니라 Windows에서 작업하는 모든 동료들이 동일한 문제를 가지고 있다는 것입니다. Linux에서는이 문제에 대해 잘 모릅니다.

또한 인터넷에 액세스 할 수없는 경우 WTP에 문제가 있습니다. 스키마 등을 다운로드하라는 일부 레지스트리에 대한 요청이있는 것 같습니다. 연결이되어 있지 않으면 중단되고 시간 초과를 기다립니다.


누가 비난해야할지 모르겠습니다 : WTP 또는 JBoss 도구. 사실, 제가 GWT (최소 JSP)로 작업 할 때 반대 방향으로갔습니다. WTP가 전혀 없습니다 !!! 이제 Java 용 일반 Eclipse를 사용하고 실행 구성을 사용하여 배포 (프로그램 방식으로 ANT 호출)하고 서버를 시작합니다. Eclipse는 ~ 1.5GB를 사용하고 여러 번 충돌했습니다. 이제는 800MB에 달하며 전체 환경이 더 안정되었습니다.


비슷한 효과를 보았습니다. 여기에 일부 프로젝트 환경에 적합한 솔루션이 있습니다.

빠르고 책임감있는 Eclipse 웹 프로젝트 환경을 보장하려면 다음을 고려하십시오.

  1. Java 개발자를위한 Eclipse IDE 사용
    • 98MB 버전은 200MB EE 버전보다 가볍습니다.
    • 일반 / 시작 및 종료에서 "Eclipse UI"를 제외한 모든 항목을 비활성화합니다.
    • 유효성 검사에서 필요하지 않은 유효성 검사기를 비활성화하십시오.
    • 이는 아마도 일부 성능 문제 (YMMW)를 방지 할 수 있습니다.
  2. Jetty 사용
    • 당신이 WTP 또는 필요하지 않은 어떤 다른 플러그인을, 그것은 순수 자바입니다
    • Tomcat과 비슷하지만 IDE / 환경에 매우 빠르고 간단하게 설치할 수 있습니다.
    • 프로젝트 파일에 직접 포함하고 모든 개발자에 대해 한 번 구성
    • 모든 IDE (Eclipse, IDEA, JDeveloper ..)에서 작동합니다.
    • "Debug As"/ "Run As"로 서블릿 컨테이너 시작
    • Eclipse 콘솔에서 빨간색 상자를 클릭하여 Servlet Container를 종료하십시오.
    • IDE 콘솔, 디버깅 및 핫 코드 교체 및 JRebel이 정상적으로 작동합니다.

결과 : WTP와 함께 Eclipse EE 버전을 사용하는 다른 많은 Eclipse 설치와 비교할 때 빠르고 반응이 빠른 Eclipse.

왜? 일부 Eclipse 기능 또는 플러그인에 버그가 포함되어 있거나 단순히 리소스를 나쁜 방식으로 사용하여 Eclipse UI가 느려질 수 있습니다.

비 Java EE Eclipse는 많은 Java EE 프로젝트 환경에서도 충분하며, 모두 아키텍처와 사용중인 도구에 따라 다릅니다.

Eclipse에서 Jetty Servlet Container를 사용해보고자하는 경우 시작하는 빠른 자습서가 있습니다. https://vaadin.com/web/jani/home/-/blogs/vaadin-for-everyone-how-to-get-started를 참조 하십시오 . VaadinProjectForAnyIDE.zip을 다운로드하면 Eclipse 프로젝트입니다. Vaadin을 무시하고 HelloWorldApplication.java를 자신의 서블릿으로 바꾸고 그에 따라 web.xml을 편집하십시오.

하나 더. Eclipse EE 버전의 경우 실제로 Eclipse 번들에 포함 된 Jetty 인 J2EE 미리보기 서버를 사용해 볼 수도 있습니다. 그러나 이것은 또한 WTP 메커니즘을 사용합니다.


또한 Eclipse / WTP의 안정성과 성능이 다소 놀랍다 고 생각합니다. 저는 2003 년 중반부터 Eclipse를 사용하고 있으며 첫 번째 릴리스부터 WTP를 사용해 왔습니다.

처음에는 품질이 절대적으로 지독했지만 0.x 버전의 경우 당연히 불평 할 수 없었습니다. WTP가 성숙 할 때까지 기다리는 동안 나는 MyEclipse를 사용했는데, 약간 괜찮 았지만 결함도있었습니다 (부분적으로 WTP를 기반으로하고 일부 WTP를 상속 받았습니다).

MyEclipse가 더 무겁고 무거워지고, 더 느리고 더 느려지고 몇 가지 안정성 문제가 발생했을 때 '순수 WTP'로 전환했습니다. 우리가 사용한 것은 실제로 기본적인 JSP / JSF 편집기 및 배포자뿐이었습니다.

WTP는 증분 배포를 수행하지 않기 때문에 (적어도 JBoss 서버 런타임에는 해당되지 않음) JBoss 도구에서 별도의 서버 런타임을 추가했습니다. Facelets를 채택했을 때 JBoss 도구에서 편집기로 전환했습니다.

그러나 우리는 MyEclipse에서도 많은 문제를 겪습니다. 설명 할 수없는 속도 저하가 있지만 훨씬 더 나쁜 것은 다양한 안정성 문제입니다. 어색한 예외와 충돌이 많이 있습니다. 내가 조사한 여러 워크 스테이션의 일반적인 .log 파일은 예외로 가득 차 있습니다. 내 로그에있는 마지막 10 개의 예외 중 일부 :

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)

삼.

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)

이것들은 단지 마지막 10 개일 뿐이며 더 많은 예외가 있습니다.

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.


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.


To answer the following question: Do you have some best practices to speed it up, especially for upper-mid-sized like ours?

Turning off validation and auto-building after file-saving is a good start to increase performance.


I've disabled the WTP JSP editor for the reasons you mentioned above: It just needs too many resources. Some more things you should consider:

  1. Edit JSPs in the normal HTML editor. That means you don't get code completion which is a good thing. IMO, Mixing Java and HTML is a mistake in the first place and an editor can't fix that. Put all Java code into helper beans (which you can then test easily) and just access the beans from JSP. This should get rid of 99% of all the <% %> tags and solve most of your problems already.

  2. Consider using Spring to be able to build more complex beans and inject them into your JSPs using these patterns:

  3. Try a different VM. WTP editors creates huge amounts of objects and now all VMs (GC implementations) can handle that equally well. If you use Sun's Java, try JRockit or IBMs J9. Also play with the GC settings. Increasing RAM won't help because if you have GC issues, more RAM usually only makes it worse (since the GC will have to process more data).

  4. Precompile as much code as possible. You don't need 4000 classes open at all times on your workspace. Cut your huge project into manageable chunks.

  5. Replace JSPs with plain Java servlets and use HTML rendering libraries like rendersnake or use a programming language which plays more nice with HTML (like Groovy).

  6. Get some decent hardware. A new PC with a quad core and 8GB RAM costs $1000. If you save ten minutes every day, the investment will be paid up in 50 days (at the rate of 1 person costs $1000/day all in all).

  7. Try MyEclipse which has much better web editors. The JSP editor is better than WTP (code completion works most of the time, for example) but it's still sluggish.


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.

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.


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.

ReferenceURL : https://stackoverflow.com/questions/5433991/eclipse-webtools-project-wtp-and-its-performance-quality

반응형