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