开发者

How do I stop JPA Facet on Eclipse from updating all the time?

开发者 https://www.devze.com 2023-04-03 22:19 出处:网络
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.

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 Be开发者_StackOverflow社区ans 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.


A friend of mine has recently shown me a way to disable the constant "JPA Facet" updates after "Maven update" operations.

Please try this: on menu Window >> Preferences >> Maven >> Java EE Integration

  • disable the "JPA Configurator" option.

How do I stop JPA Facet on Eclipse from updating all the time?


I just turned off all validation by Eclipse via Preferences > Validation > suspend all validators:

How do I stop JPA Facet on Eclipse from updating all the time?

I don't remember the last time I ever needed validation, or thought that it was a useful feature in the first place. If you want to help your whole team, you can also check in the following file in each of your projects' .settings/org.eclipse.wst.validation.prefs files:

DELEGATES_PREFERENCE=delegateValidatorList
USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;
USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;
USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationtrueversion1.2.600.v201501211647
eclipse.preferences.version=1
override=true
suspend=true
vf.version=3

This has the same effect, but can be checked into version control.

And suddenly, the CPU cooler is extremely quiet again.


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.

  • https://bugs.eclipse.org/bugs/show_bug.cgi?id=370407
  • https://bugs.eclipse.org/bugs/show_bug.cgi?id=377039
  • https://bugs.eclipse.org/bugs/show_bug.cgi?id=376787
  • https://bugs.eclipse.org/bugs/show_bug.cgi?id=336403

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).


You can also look for this entry in any org.eclipse.wst.common.project.facet.core.xml file

<installed facet="jpt.jpa" version="1.0"/>

and remove it


I'am using RedHat Code Ready Studio. I have disabled :

How do I stop JPA Facet on Eclipse from updating all the time?

How do I stop JPA Facet on Eclipse from updating all the time?

How do I stop JPA Facet on Eclipse from updating all the time?

How do I stop JPA Facet on Eclipse from updating all the time?

How do I stop JPA Facet on Eclipse from updating all the time?

And the pain is finaly gone....

0

精彩评论

暂无评论...
验证码 换一张
取 消