如何在Eclipse上停止JPA Facet的更新? [英] How do I stop JPA Facet on Eclipse from updating all the time?

查看:294
本文介绍了如何在Eclipse上停止JPA Facet的更新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中有一个EJB2 / EJB3 Java项目。我最近启用了JPA Facet,现在安装了Dali并配置了访问包含实际表和数据的MySQL DB。



问题是,IDE Java编辑器中编辑实体bean成为100-1000倍慢。写一个字,看更新JPA项目出现在状态栏上,在高负载下等待30秒CPU,Eclipse完全无响应,然后继续写下一个字。



使JPA缓慢的项目是中等规模的,而不仅仅是一个简单的webstore,而不是企业级。我计算了42个无状态会话Bean和49个实体Bean。我们实际上有更多的实体bean,但是其中许多还没有被转换为EJB 3,而是仅以EJB 2.1映射。



最长的会话bean跨越20616行,最长的方法是低于2k行的头发。



JPA的缓慢是如此严重,这也使得代码慢。每5-10个字符后,Eclipse完全停止几秒钟,内容辅助几乎不可用,因为它会触发Eclipse的内部超时。



所以,问题是:如何保持JPA Facet启用项目,仍然不会落后于所有的真正的工作?一些简单的切换开关,只是禁用JPA部分,然后再重新启用将是可爱的。

解决方案

项目已经做出了几个性能改进,应该有助于你的情况。我们还做了一些改动,将我们的一些工作推送到后台线程并使用Eclipse Jobs框架。





如果您仍然看到Juno的性能下降,我将非常感谢您向我们发送一些性能分析信息。
我可以尝试在我的工作中使用您的结果来提高性能(如果可能,在Juno SR1中)。我已经使用jdk1.6.0_31中包含的Java VisualVM成功了。我将剖析器CPU设置设置为从类开始分析:org.eclipse.jpt。**,取消选中配置文件新Runnables和仅配置文件:org.eclipse.jpt。然后,您可以运行一个导致问题的用例,并将生成的快照附加到eclipse错误(WebTools-Dali Jpa工具)。


I have a EJB2/EJB3 Java project in Eclipse. I recently enabled JPA Facet and now installed Dali and configured access to the MySQL DB containing the actual tables and data.

The problem is, editing entity beans in IDE Java editor became 100-1000 times slower. Write one word, see "Update JPA Project" appear on status bar, wait 30 seconds CPU under high load, Eclipse totally unresponsive, then continue and write next word..

The project that makes JPA slow is medium-sized, not just a simple webstore, but not enterprise-class either. I count 42 Stateless Session Beans and 49 Entity Beans. We actually have more entity beans, but many of them have not yet been converted to EJB 3, but are mapped only with EJB 2.1 instead.

The longest of the session beans spans 20616 lines, longest methods being a hair below 2k lines.

The slowness of JPA is so severe, it makes also typing code slow. After every 5-10 characters the Eclipse goes into complete halt for several seconds and content-assist is almost unusable, because it keeps triggering Eclipse's internal time-outs.

So, the question is: How do I keep the JPA Facet enabled for the project and still make it not lag all the real work? Some simple toggle switch that would just disable the JPA part and then later re-enable would be lovely.

解决方案

In Juno the Dali project has made several performance improvements that should help with your situation. We also made changes to push some of our work to background threads and use the Eclipse Jobs framework.

If you still see performance lags in Juno I would greatly appreciate you sending us some performance profiling information. I could attempt to use your results in my work to improve performance (In Juno SR1 if possible). I've had success using the Java VisualVM included in jdk1.6.0_31. I set the profiler CPU settings to 'Start profiling from classes:' org.eclipse.jpt.**, uncheck 'Profile new Runnables', and 'Profile only classes:' org.eclipse.jpt.*. Then you could run one of your use cases that causes issues and attach the resulting snapshot to an eclipse bug (WebTools-Dali Jpa Tools).

这篇关于如何在Eclipse上停止JPA Facet的更新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆