IDEA 3378 really horrible performance problem when editing JSP file

I loaded a large project which contains two large modules: a "Server" module which contains java sources and a "Web" module which contains mostly JSP / CSS / HTML / JavaScript.

Loading the project is fine. As long as I work on the Java Source, performance is tolerable. (It still is less responsive with chunky updates compared to IDEA 4.5.4)

But if I load a JSP file into the editor, the CPU goes up to solid 100% and stays there. When I run the SysInternals File Monitor program (http://www.sysinternals.com/Utilities/Filemon.html), it shows IDEA constantly accessing:

idea.exe:3920 QUERY INFORMATION D:\data\IDEAProjects3378\v70\Web\classes SUCCESS Attributes: D

Not sure if this is related to the problem, but might provide a clue.
This directory is there, but it is empty. I don't use IDEA to build or deploy my application. I just use it to edit the code and launch ant tasks.

I did a CPU snapshot of when cpu is at 100% when a JSP file is in the Editor and I am not doing anything.
I uploaded filename "background_thread_100%cpu_3378_alex_22.06.2005_18.21.29.zip"
to ftp.intellij.net/.uploads directory.

If I switch Editor back to a java source file, the CPU% immediately drops back to near 0% when I am not doing anything. And IDEA no longer tries to access the D:\data\IDEAProjects3378\v70\Web\classes directory.

I tried some Optimize Imports and Reformat Code on some JSP file just for fun and I got a number of Exceptions. Also, the Optimize Imports appeared took 5 minutes to complete on a 600 line JSP file! (P4 2.8 Ghz 1.5 GB ram Windows XP) That could releated to the same problem.


10 comments
Comment actions Permalink

Does this 100% cpu lasts for long and if it influence editor response
rate? From your log I found that most of the time you were inside
inspections (which is normal) and this analysis must stop when you start
editing. If it's not it looks like a bug, if it is just don't look at
cpu usage :).

IK
Alex wrote:

I loaded a large project which contains two large modules: a "Server" module which contains java sources and a "Web" module which contains mostly JSP / CSS / HTML / JavaScript.

Loading the project is fine. As long as I work on the Java Source, performance is tolerable. (It still is less responsive with chunky updates compared to IDEA 4.5.4)

But if I load a JSP file into the editor, the CPU goes up to solid 100% and stays there. When I run the SysInternals File Monitor program (http://www.sysinternals.com/Utilities/Filemon.html), it shows IDEA constantly accessing:

idea.exe:3920 QUERY INFORMATION D:\data\IDEAProjects3378\v70\Web\classes SUCCESS Attributes: D

Not sure if this is related to the problem, but might provide a clue.
This directory is there, but it is empty. I don't use IDEA to build or deploy my application. I just use it to edit the code and launch ant tasks.

I did a CPU snapshot of when cpu is at 100% when a JSP file is in the Editor and I am not doing anything.
I uploaded filename "background_thread_100%cpu_3378_alex_22.06.2005_18.21.29.zip"
to ftp.intellij.net/.uploads directory.

If I switch Editor back to a java source file, the CPU% immediately drops back to near 0% when I am not doing anything. And IDEA no longer tries to access the D:\data\IDEAProjects3378\v70\Web\classes directory.

I tried some Optimize Imports and Reformat Code on some JSP file just for fun and I got a number of Exceptions. Also, the Optimize Imports appeared took 5 minutes to complete on a 600 line JSP file! (P4 2.8 Ghz 1.5 GB ram Windows XP) That could releated to the same problem.


0
Comment actions Permalink

Yes, it is affecting editing. The problem is that it appears to be continue even after the initial load.

When I load a java source file into the editor, the cpu will spike up, but If I dont' do anything, then eventually the cpu% will drop back to 0.

For the JSP file, the cpu stays at 100% forever even though I am not editing the file; I just let it sit there with the JSP file in the Editor pane. (ok, I'm not sure about "forever", but at least 5 minutes -- that's the longest I was willing to wait.)

After doing a few reformat and optimize imports, the problem seemed to get worse and IDEA memory usage grew. Something really bad was happening during Optimize Imports because it was taking 5 minutes. Even after the operation finished, the editor was very sluggish.

I will do a cpu snapshot of the 5 minute Optimize Imports so you can take a look at that. Because that is definately a bug.

There is something really inefficient going on, because it shouldn't take this long to process a 600 line JSP file. I thought that editing Java Source files was sluggish in Irida, but editing JSP files are ridiculously sluggish.

I was really excited about the improved JSP, XML, HTML, Javascript support because it will directly benefit my work, but I'm really un-excited if it comes at the cost of slowing the Editor to a crawl with frequest pauses.

I'm crossing fingers that JetBrains can bring back the snappiness we come to expect with IntelliJ otherwise this is going to be a very bittersweet upgrade to Irida.

0
Comment actions Permalink

Please let me see your file. I hope we can handle this.

IK

Alex wrote:

Yes, it is affecting editing. The problem is that it appears to be continue even after the initial load.

When I load a java source file into the editor, the cpu will spike up, but If I dont' do anything, then eventually the cpu% will drop back to 0.

For the JSP file, the cpu stays at 100% forever even though I am not editing the file; I just let it sit there with the JSP file in the Editor pane. (ok, I'm not sure about "forever", but at least 5 minutes -- that's the longest I was willing to wait.)

After doing a few reformat and optimize imports, the problem seemed to get worse and IDEA memory usage grew. Something really bad was happening during Optimize Imports because it was taking 5 minutes. Even after the operation finished, the editor was very sluggish.

I will do a cpu snapshot of the 5 minute Optimize Imports so you can take a look at that. Because that is definately a bug.

There is something really inefficient going on, because it shouldn't take this long to process a 600 line JSP file. I thought that editing Java Source files was sluggish in Irida, but editing JSP files are ridiculously sluggish.

I was really excited about the improved JSP, XML, HTML, Javascript support because it will directly benefit my work, but I'm really un-excited if it comes at the cost of slowing the Editor to a crawl with frequest pauses.

I'm crossing fingers that JetBrains can bring back the snappiness we come to expect with IntelliJ otherwise this is going to be a very bittersweet upgrade to Irida.

0
Comment actions Permalink

I have uploaded two more snapshots:

5minutes_with_jsp_file_in_editor_pane_3378_alex_23.06.2005_01.38.47.zip

I restarted IDEA 3378, loaded the "AddRelationship.jsp" file. It is in read-only state. I let IDEA run for 2 minutes, while I didn't do anything, then I switched on CPU snapshot, let it collect for 5 minutes, then switched it off. During this whole time, IDEA cpu is running at 100% cpu. Gotta be a bug somewhere; Maybe IDEA keeps reparsing / reformatting the JSP file even though nothing is changed?

optimize_imports_on_jsp_file_3378_alex_23.06.2005_01.46.03.zip

The optimize imports took about 1 minute. (The other time I tried it took 5 minutes). It could be whatever is causing IDEA to constantly use 100% cpu is impactly Optimize Imports.

I have also uploaded some JSP files. "AddRelationship.jsp" is the JSP file I loaded into the editor. It includes three other JSPs: "GlobalCode.jsp", "RelationshipInstanceFilter.jsp", and "RelationshipAttributeFilter.jsp". The "AddRelationship.jsp" imports a bunch of java classes, so you will get lots of syntax errors, but maybe this will help you. The java classes the JSP file depends on are located in the "Server" module in the project. THe JSP files are in the "Web" module. The module dependencies are setup so that "Web" depends on "Server" module.

I uploaded all files to ftp.intellij.net/.uploads. Let me know if they are incomplete or 0 size -- I have trouble uploading to ftp.intellij.net for some reason. The windows ftp client keeps handing while doing "mput".

0
Comment actions Permalink

I'm experiencing the JSP slowness too, and I've opened an issue in JIRA the day 3370 was out (3378 still shows the same symptoms):

http://www.jetbrains.net/jira/browse/IDEA-2825

I'll try to record another snapshot using #3378 today, and attach it to this same issue.

0
Comment actions Permalink

I am experiencing the same thing. When I work on JSP's the memory IntelliJ uses keeps climbing ... its currently at 190M when editing java files, it is fine.
Please fix this guys!

Todd Johnson

if you need any more specifics, let me know

0
Comment actions Permalink

See this issue I created:
http://www.jetbrains.net/jira/browse/IDEA-3015

JSP still needs some work ;)

"Alex" <no_mail@jetbrains.com> wrote in message
news:10381398.1119491490368.JavaMail.itn@is.intellij.net...
>I loaded a large project which contains two large modules: a "Server"
>module which contains java sources and a "Web" module which contains mostly
>JSP / CSS / HTML / JavaScript.
>

Loading the project is fine. As long as I work on the Java Source,
performance is tolerable. (It still is less responsive with chunky updates
compared to IDEA 4.5.4)

>

But if I load a JSP file into the editor, the CPU goes up to solid 100%
and stays there. When I run the SysInternals File Monitor program
(http://www.sysinternals.com/Utilities/Filemon.html), it shows IDEA
constantly accessing:

>

idea.exe:3920 QUERY INFORMATION D:\data\IDEAProjects3378\v70\Web\classes
SUCCESS Attributes: D

>

Not sure if this is related to the problem, but might provide a clue.
This directory is there, but it is empty. I don't use IDEA to build or
deploy my application. I just use it to edit the code and launch ant
tasks.

>

I did a CPU snapshot of when cpu is at 100% when a JSP file is in the
Editor and I am not doing anything.
I uploaded filename
"background_thread_100%cpu_3378_alex_22.06.2005_18.21.29.zip"
to ftp.intellij.net/.uploads directory.

>

If I switch Editor back to a java source file, the CPU% immediately drops
back to near 0% when I am not doing anything. And IDEA no longer tries to
access the D:\data\IDEAProjects3378\v70\Web\classes directory.

>

I tried some Optimize Imports and Reformat Code on some JSP file just for
fun and I got a number of Exceptions. Also, the Optimize Imports appeared
took 5 minutes to complete on a 600 line JSP file! (P4 2.8 Ghz 1.5 GB ram
Windows XP) That could releated to the same problem.

>
>



0
Comment actions Permalink

Alex,
Thank you for your assistance. We didn't pay much attention to
highlighting performance before got stable parsing. Now I hope we've
solved this problem.

IK

0
Comment actions Permalink

The difference between 3386 and 3378 is like night and day
for me! Looks like JetBrains finally nailed the perpetual %
cpu thrashing problem when loading JSP files into the
Editor! Now that I can load a JSP file without bringing my
system to it's knees, I have been checking out the JSP and
javascript parsing.

It still seems to take longer for the JSP file to parse
than a comparable Java file but at least it's in the same
ballpark now. I haven't done any editing of JSP files with
3386 yet, so don't know if that is sluggish yet. I guess
JSP editing is going to be slower just because of all the
extra parsing which wasn't happening in 4.5.4. Still might
need that dual-core workstation to make it feel as snappy
as 4.5.4.

0
Comment actions Permalink

JSP parsing and editing is definitely much, much faster with 3386. Even more so if you turn
off HTML error/inspection highlighting.

Good Job!

0

Please sign in to leave a comment.