History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-24162
Type: Performance Problem Performance Problem
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Gregory Shrago
Reporter: Jeremy Haile
Votes: 1
Watchers: 8
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Editing/inspections slow - JPA?

Created: 02 Jan 08 20:35   Updated: 15 Aug 08 19:14
Component/s: Editor. Error Highlighting
Fix Version/s: Diana M1

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Zip Archive 7626_jhaile_02.01.2008_12.20.12.zip (1.92 Mb)
2. Zip Archive 7626_jhaile_02.01.2008_12.39.29.zip (2.02 Mb)
3. Zip Archive 7648_jhaile_14.01.2008_17.10.20.zip (2.34 Mb)
4. Zip Archive 7648_jhaile_14.01.2008_17.20.33.zip (2.34 Mb)
5. Zip Archive 7648_jhaile_18.01.2008_09.16.48.zip (2.11 Mb)
6. Zip Archive 7684_jhaile_11.02.2008_15.15.52.zip (2.17 Mb)

Environment: Mac OS X Leopard, Core 2 Duo, 4GB RAM, (1GB of RAM dedicated to IDEA)
Issue Links:
Duplicate
 
This issue is duplicated by:
IDEADEV-24381 JSP editing slow due to inspections/h... Normal Resolved

Build: 7,626
Fixed in build: 8,717
Severity: Medium


 Description  « Hide
Editing in IDEA is extremely slow, which appears to be due to inspections taking a long time to run.

Looking through the CPU snapshot, it appears to be related to JPA and JpaMemberPattern.accepts(...)

I have previously had problems with Spring support being slow, but I don't see that in the snapshot.



 All   Comments   Work Log   Change History      Sort Order:
Jeremy Haile - 02 Jan 08 20:43
Uploaded another snaphot (12_39_29). This one I started profiling, pressed enter after a @ManyToMany annotation, and stopped profiling as soon as the editor let me type again (which took 6 seconds)

The performance is really terrible. Is there a workaround? I've tried disabling JPA related inspections without any success.


Jeremy Haile - 02 Jan 08 20:44
I have about 210 @Entity's in my project. This could certainly be an unscalable code issue, where IDEA's inspections don't scale to handle larger projects.

Gregory Shrago - 09 Jan 08 20:00
A couple of performance issues are addressed in the upcoming 7.0.3. EAP.

Jeremy Haile - 15 Jan 08 01:19
Performance does not seem to be any better in latest EAP build (7648). Uploaded another snapshot showing performance problem.

In this case, I opened a file containing HQL and waited almost 2 minutes - the file had still not updated syntax checking and highlighting.

If I type the name of a class that is not imported, it never offers me the opportunity to import the class, because it hasn't finished highlighting the file. After about 2 minutes of waiting, I got tired of waiting and just stopped the CPU snapshot.

I also get slow performance in files with JPA annotations, so although this file only contains HQL, it may not be the only JPA/HQL related performance problem.


Jeremy Haile - 15 Jan 08 01:25
Uploaded another snapshot (14.01.2008_17.20.33). This snapshot involved me opening a file that has nothing to do with JPA or HQL, but is slow to highlight. All I did is type in a class name that needed to be importing and it took about 8-10 seconds for IDEA to prompt me to import the class.

Peter Gromov - 15 Jan 08 15:54
More fixes added. See upcoming EAP

Jeremy Haile - 15 Jan 08 18:20
Any idea when the next EAP will be released? today? tomorrow?

Maxim Drobintsev - 16 Jan 08 00:31
I have a similar problem, I think.
In my project there are several thousand classes that are code-generated. All of them implement certain marker interface (i.e. an interface without any methods). If I navigate to this interface IDEA freezes for 30-90 seconds with 100% CPU usage. It also freezes if I do any editing in this interface.

Peter Gromov - 16 Jan 08 12:15
Snapshot?

Jeremy Haile - 18 Jan 08 19:17
Since IDEA-16906 was closed as a duplicate of this issue, I'll upload the 7648_jhaile_18.01.2008_09.16.48 snapshot here as well. This snapshot is JSP specific.

JSP editing is extremely slow, with random lockups and freezes being normal. Even actions like scrolling down a page can lag and freeze. In fact, it is quite common that when I scroll the editor window, the scrolling lags and freezes. JSP editing is almost unusable.


Jeremy Haile - 11 Feb 08 23:30
It seems like Spring and Hibernate editing got faster on some of the past EAP builds (prior to 7684) but has now slowed down again. Multiple developers at my company have noticed that the last EAP build or so (7684) feels much slower than 2-3 EAP builds back.

I'm attaching another snapshot of a JPA class taking a LONG time to highlight.