Eclipse webtools 项目 (WTP) 及其性能/质量

发布于 2024-10-26 04:47:54 字数 2960 浏览 5 评论 0原文

我们公司已经使用 eclipse 好几年了(我们从 0.7 版开始就使用 WTP)

我目前正在评估 eclipse 3.6.2 和 WTP 3.2.3 ,它应该用 WTP 3.0.4 取代 eclipse 3.4.2作为我们的主要 IDE。

我不得不说,我对性能问题再次感到非常失望:
WTP 3.2.3 似乎比 3.0.4 慢得多。
事实上,我真的很想知道为什么 WTP 每次发布都会变慢。

我们的一个应用程序(动态 Web 项目)包含大约 4000 个 java 类和 700 个 jsps/jsp 片段。我们只需要基本的 WTP 功能来开发 jsps、xml 和 xsd。我们不需要像 Dali 这样复杂的功能(如果 JPA 工具真的被 webtools 项目覆盖?)、Libra

另一个有趣的点是 WTP 似乎减慢了整个 IDE。 SWT 在几分之一秒内没有响应,CPU 使用率非常高(特别是在构建发生之后 - 如果您查看系统作业,几个 jsp/javascript 索引器正在工作几分钟,即使所有 WTP 构建验证器也是如此已被禁用),打开新文件速度较慢,浏览项目等。

这在仅包含单核 CPU 的旧机器上尤其明显。

最糟糕的是,我感觉 WTP 开发团队不太关心性能 (例如,查看 http://wiki.eclipse.org/WTP_Performance_Tests 页面 - 上次更新发生在 2008 年)。

有关基本功能性能(例如 jsp 编辑/验证)的错误报告和新闻组帖子通常在一段时间后被忽略或关闭,一些示例: 此处此处这里

WTP 怎么样?


< strong>请不要误会我的意思:

我不想责怪 WTP。
事实上,我相信 WTP 是一个由才华横溢的团队开发的优秀开源项目。
但显然该项目在质量保证方面存在问题,尤其是在性能方面,影响了可用性和用户接受度。

我只是想指出,团队应该首先关注对大多数用户来说必不可少的事情,然后再致力于实现超级功能。

我的问题

  • 您对 WTP(尤其是最新版本)的体验如何?
  • 你能证实或反驳我的观察吗?
  • 有更好的选择吗?
  • 您是否从 WTP 切换到了 WTP?为什么?
  • 您是否有一些加快速度的最佳实践,特别是对于像我们这样的中上型企业?

更新

我想对此问题进行更新以反映当前的答案和 总结当前的结果:

  • 许多用户或多或少地抱怨相同的问题,所以我认为这些问题已得到证实。
    顺便说一句,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.

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

夜血缘 2024-11-02 04:47:54

作为回应,我是在 WTP 中提供 JSP、XML 和 JavaScript 源代码编辑功能的项目的负责人。一个简单的事实是,我们没有在性能测试上花费太多时间,因为我们缺乏这样做的资源。当然,我们希望积极主动而不是被动应对,但我们倾向于首先将时间分配给功能性问题。我们确实有一个采用者产品定期运行性能回归测试,但我预计测试现在已经在多核机器上运行——而且我们已经有一段时间没有收到任何新的危险信号报告了。

在您链接到的 3 个错误中,其中 2 个早于您称赞的 3.0.4 版本,第三个是格式性能问题(已解决),或者是针对 XML 文件的键入时验证问题(修复该问题需要触发了 Xerces、iirc 中的内存泄漏,因此我们当时没有将其放入)。如果您有可以附加到错误的具体项目,并说“在 3.2 中执行 X 的速度慢了 Y 量”,我们将尽我们所能找出哪里存在回归。

至于索引器,它们至少应该最终完成。存储的磁盘信息在 WTP 版本之间发生了变化,并且这些文件需要重新处理,以便它们再次包含在搜索和(在实现的情况下)重构操作中。一旦初始索引完成,它就会逐渐起作用并且几乎不引人注意。您可能遇到的一项架构更改是,对于 JSP,整个工作区需要在单个工作台会话中建立索引,以便该索引被视为“最新”。出于沮丧而关闭 Eclipse 只会延长重新处理的影响。

听起来您公司的标准安装包括整个 WTP,而不是滚动您自己的自定义发行版。我强烈建议您检查启动和关闭首选项页面,并关闭您不感兴趣使用的任何功能的提前启动。您提到的任何感兴趣的内容都没有使用该设施,但 WTP 和平台的其他领域可以使用该设施。您对验证不感兴趣的任何内容都可以在 验证 首选项页面上进行,以及在 Web / JSP 上默认验证 JSP 片段的设置文件 / 验证首选项页面。

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.

泪眸﹌ 2024-11-02 04:47:54

我们在这里的 WTP 3.2.3 也有同样的问题。我们在我们的产品中也使用它好几年了,但我们的开发人员和客户对该工具的接受程度逐年下降,因为在每个新版本中它的速度越来越慢。

如果我可以禁用所有“高级”功能,我想使用它,但正如您所提到的,您根本无法禁用索引器。另外,如果 JSP 文件的验证器已经在运行,则您无法停止它(如果您有那么多文件,并且我们的项目中还有大约 1000 个 JSP 文件和许多标记文件,您可以测试它)。

我也可以证明增加内存并没有帮助。它只能防止整个 Eclipse 崩溃,但并不能减少 UI 对 WTP 内部操作的阻塞。

在最新版本 3.2.3 中,当我从服务器视图启动 Tomcat 时,遇到了很多挂起问题。 UI挂起大约1 分钟。不只是我有这个问题,所有使用 Windows 的同事都有同样的问题。在Linux上我不知道这个问题。

当您无法访问互联网时,WTP 也会出现问题。似乎有一些注册表要求下载模式或类似的东西,如果您没有连接,那么它只会挂起并等待超时。

We have the same problem with WTP 3.2.3 here, too. We use it in our product for several years, too but the acceptance of our developers and customers in this tool is decreasing every year because in every newer release it is slower and slower.

I would like to use it if I could disable all "advanced" features but as you mentioned you cannot disable the indexers at all. Also you cannot stop the validator of JSP files if it is already running (you can test this if you have that many files as you have and we also have around 1000 JSP files and many tag files in our project).

I also can prove that increasing the memory does not help. It only prevents crashes of the whole eclipse but it does not reduce the UI blocking internal operations of WTP.

In the newest version 3.2.3 I got many hangs when I start Tomcat from within the servers view. The UI just hangs about 1 minute. It's not only me who has the hangs, it's all my colleagues who work on Windows have the same problem. On Linux I do not know about this problem.

Also there are problems in WTP when you have no access to the internet. It seems there are request to some registries to download schemas or such things and if you do not have a connection then it just hangs and waits for the time out.

零崎曲识 2024-11-02 04:47:54

我不知道该怪谁:WTP 还是 JBoss Tools。
事实是,当我使用 GWT(最小 JSP)时,我走了相反的路:根本没有 WTP!我现在使用普通的 Eclipse for Java,并使用运行配置来部署(以编程方式调用 ANT)并启动服务器,我再也没有回头过!
Eclipse 过去占用约 1.5GB 并且崩溃了好几次。现在,它占用了~800MB,整个环境变得更加稳定。

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.

瀟灑尐姊 2024-11-02 04:47:54

我已经看到了类似的效果,这里有一个可能适合某些项目环境的解决方案...

为了保证快速且负责任的 Eclipse Web 项目环境,请考虑以下内容:

  1. Use Eclipse IDE for Java Developers
    • 98MB 版本比 200MB EE 版本更精简
    • 从常规/启动和关闭中,禁用除“Eclipse UI”之外的所有内容
    • 从验证中禁用您不需要的验证器
    • 这些可能可以防止一些性能问题(YMMW)
  2. 使用码头
    • 您不需要 WTP 或任何其他插件,它是纯 Java
    • 类似于 Tomcat,但速度非常快且速度快。易于安装到任何 IDE/环境中
    • 直接嵌入到您的项目文件中,为每个开发人员配置一次
    • 适用于任何 IDE(Eclipse、IDEA、JDeveloper...)
    • 使用“调试方式”/“运行方式”启动 Servlet 容器
    • 通过单击 Eclipse 控制台上的红色框关闭 Servlet 容器
    • IDE 控制台、调试和热代码替换& JRebel 工作正常

结果:快速且稳定与使用带有 WTP 内容的 Eclipse EE 版本的许多其他 Eclipse 安装相比,Eclipse 响应迅速。

为什么?某些 Eclipse 功能或插件可能包含错误,或者只是以错误的方式使用资源,这会导致 Eclipse UI 运行缓慢。

即使对于许多 Java EE 项目环境,非 Java EE Eclipse 也足够好了,这完全取决于您的体系结构以及您使用的工具。

如果您希望使用 Eclipse 尝试 Jetty Servlet 容器,这里有一个快速入门教程。请参阅 https://vaadin。 com/web/jani/home/-/blogs/vaadin-for-everyone-how-to-get-started 。下载 VaadinProjectForAnyIDE.zip,它是一个 Eclipse 项目。只需忽略 Vaadin 的内容并将 HelloWorldApplication.java 替换为您自己的 servlet 并相应地编辑 web.xml 即可。

还有一件事。对于 Eclipse EE 版本,您可能还希望尝试 J2EE 预览服务器,它实际上是嵌入到 Eclipse 捆绑包中的 Jetty。不过,这也利用了WTP机制。

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.

寂寞陪衬 2024-11-02 04:47:54

我还认为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)

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)

请注意,这些只是最后 10 个,还有很多很多例外。

随意的反应是:“您的 Eclipse 安装已损坏!您有本地问题!”是的,我可能有本地问题,但这个“本地问题”似乎很普遍,因为我检查了许多 Eclipse 安装他们的日志中似乎有这些东西。

我还遇到了各种部署问题,如以下链接中报告的问题: http://community.jboss .org/thread/158611 它可能是特定于 JBoss 工具的,也可能是基于底层 WTP 甚至 Eclipse 代码的。我不知道,但我知道这是一个令人讨厌的问题。每个 WTP 和 JBoss 工具版本都修复了“某些问题”,并且每个版本都会以稍微不同的形式重新出现类似的问题。

在稳定性问题之间,我能够完成一些工作,并且我喜欢编辑器为我提供的自动完成和导航功能(这使我无法切换到文本编辑器并完全在命令行上构建),但我确信会喜欢一些增加的稳定性。

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.

秉烛思 2024-11-02 04:47:54

到目前为止,加快项目速度的最佳方法是预编译我当前未使用的代码。我们的系统由大约 20 个项目组成,在处理任何特定问题时,我只涉及这些 java 文件的特定子集。编译大部分我不会接触的代码并将其放入一些 .jar 中,然后使用它作为源代码而不是包含项目,事实证明可以大大加快速度。我想如果您有 4k 以上的文件,它也会对您有所帮助。
每个项目都只有一个小的 build.xml,它将生成一个 jar 来包含。

至于 JSP 编辑中令人头脑麻木的缓慢。我也有同样的问题,就是速度太慢了我没有超过 100 个 jsp 文件,但我有和你一样的问题。我的解决方案就是在硬件上投入资金,我必须承认我喜欢这样做:P。

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.

爱你是孤单的心事 2024-11-02 04:47:54

回答以下问题:
您是否有一些加快速度的最佳实践,特别是对于像我们这样的中型企业?

在文件保存后关闭验证和自动构建是提高性能的良好开端。

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.

很糊涂小朋友 2024-11-02 04:47:54

由于您上面提到的原因,我已禁用 WTP JSP 编辑器:它只需要太多资源。您还应该考虑以下一些事项:

  1. 在普通 HTML 编辑器中编辑 JSP。这意味着您无法获得代码完成这是一件好事。 IMO,混合 Java 和 HTML 首先就是一个错误,编辑器无法修复它。将所有 Java 代码放入辅助 bean 中(然后您可以轻松地对其进行测试),然后只需从 JSP 访问这些 bean。这应该可以消除 99% 的 <% %> 标记,并解决大部分问题。

  2. 考虑使用 Spring 来构建更复杂的 bean 并使用以下模式将它们注入到您的 JSP 中:

    • 如何将 spring bean 注入到jsp 2.0 SimpleTag?
    • 使用 SpringBeanAutowiringSupport:

      <前><代码><%!
      @Autowired
      私人豆豆;

      公共无效jspInit(){
      SpringBean自动装配支持
      .processInjectionBasedOnServletContext(
      这个,getServletContext()
      );
      }
      %>

  3. 尝试不同的VM。 WTP 编辑器创建大量对象,现在所有 VM(GC 实现)都可以同样很好地处理这些对象。如果您使用 Sun 的 Java,请尝试 JRockitIBM J9。还可以调整 GC 设置。增加 RAM 不会有帮助,因为如果您遇到 GC 问题,更多 RAM 通常只会使情况变得更糟(因为 GC 必须处理更多数据)。

  4. 预编译尽可能多的代码。您不需要在工作区中始终打开 4000 个课程。将您的大型项目切成可管理的块。

  5. 用纯 Java servlet 替换 JSP,并使用 HTML 渲染库,例如 rendersnake 或使用与 HTML 配合得更好的编程语言(例如 Groovy)。

  6. 获得一些像样的硬件。一台配备四核和 8GB RAM 的新 PC 售价为 1000 美元。如果你每天节省 10 分钟,50 天就能收回投资(按 1 人每天 1000 美元计算)。

  7. 尝试MyEclipse,它有更好的网页编辑器。 JSP 编辑器比 WTP 更好(例如,代码完成在大多数情况下都有效),但它仍然很慢。

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.

_失温 2024-11-02 04:47:54

WTP (3.2.3) 对我来说也很慢。我相信我已经找到了一些方法让它不那么慢:

  • 我们使用 maven,所以有一个 target 目录,其中包含所有 JSP 和其他一些 XML 的副本。我认识到它们有时会被 WTP 验证器扫描。但这不是必需的,因此我已将它们排除在验证之外(Project/Properties/Validation/XXX/Exclude Group/)。 (target 目录标记为派生目录时,您应该能够获得相同的效果,但这有时对我不起作用;-(
  • 我已经制作了 < em>(未经科学证明) 观察发现,JSPX 的 WTP 似乎比 JSP 文件更快。

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.
回忆凄美了谁 2024-11-02 04:47:54

如果您需要准系统 Java EE,那么使用 Netbeans 会更好,如果您需要一切但只是工作,那么使用 IDEA 会更好。就是这么简单。

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.

感情洁癖 2024-11-02 04:47:54

无法发表评论,所以我只会将我的评论添加到这个答案中。

您是否尝试过增加 Eclipse 的内存分配,我知道不久前我在 Mac OS X 上使用它时它总是崩溃。有一个配置文件,其中包含基本 RAM 分配,一旦我修改了该文件并给它额外的 128 MB 内存,它就会表现得更好。不确定这是否会影响 WTP,我对核心 Eclipse 应用程序本身进行了更多评论。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文