This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 142684 - [65cat] JSP editor sluggish on auto complete and save
Summary: [65cat] JSP editor sluggish on auto complete and save
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP Parser (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker with 1 vote (vote)
Assignee: Tomas Mysik
URL:
Keywords: PERFORMANCE, REGRESSION
Depends on:
Blocks:
 
Reported: 2008-08-02 16:32 UTC by big_al
Modified: 2008-08-07 08:05 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stacktrace (22.21 KB, text/plain)
2008-08-02 16:33 UTC, big_al
Details
Another stack trace (20.07 KB, text/plain)
2008-08-02 22:01 UTC, big_al
Details
threaddump (3.98 KB, text/plain)
2008-08-04 13:08 UTC, Jindrich Sedek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description big_al 2008-08-02 16:32:48 UTC
[ BUILD # : 200807310201 ]
[ JDK VERSION : 1.6.0_07 ]

When invoking auto complete (CTRL+SPACE) for attributes or attribute
content on a JSP tag the system freezes for 10-15 seconds and the
whole system becomes completely unresponsive. This also occurs when
saving after making changes to a JSP file.

Stacktrace attached.
Comment 1 big_al 2008-08-02 16:33:20 UTC
Created attachment 66386 [details]
Stacktrace
Comment 2 big_al 2008-08-02 21:57:39 UTC
Also tested on build 200808010201

On top of that the whole system froze again when I was working on a JSP page. This time I had to kill the process from
the task master. Stacktrace attached.

I'd now consider the JSP editor to be P1 as the performance is so bad that it cannot be used efficiently.
Comment 3 big_al 2008-08-02 22:01:55 UTC
Created attachment 66398 [details]
Another stack trace
Comment 4 Oleg Khokhlov 2008-08-03 15:23:33 UTC
20080802.
Create web app:
if I add JSF framework autocomplete after < is about 5sec. on my computer
if I add Struts it's about 10sec.
for web app w/o framework or with other frameworks autocomplete is ok.
Comment 5 big_al 2008-08-03 21:23:57 UTC
With 200808021401 the performance seems to be even worse. Now I can barely do anything (opening a file, editing,
auto-completing) without CPU going to 100% and the whole system freezing. Also I noticed that it takes longer for
NetBeans to recognise the tags used in existing JSP files (by recognising I mean highlighting the tags with bold blue
rather than normal blue).
Comment 6 Marek Fukala 2008-08-04 10:15:04 UTC
I tried to reproduce (on Mac) the issue on the latest build in a web project with moderate number of jsps. Regardless
there are any frameworks in the project the completion speed is approximately the same (almost instant). Web project
reparse is also fast.

The threaddumps shows mostly some disk activity triggered from the JSP parser. Can you please confirm your web project
is located on local filesystem? There might be some timestamp issues on remote FS which may lead to similar problem.

Can you also confirm you are using Windows XP? Could you try to run netbeans with a new userdir? Can you reproduce the
problem on a brand new web project with the frameworks you mention added? If not, how much files (JSPs, java classes)
does your project contain? BTW is the problem regression of the 200807310201 build? Did it work fine with older ones?

Please try to answer the questions quickly since we need to resolve all P1 issues ASAP. Once we are able to reproduce,
we can provide some fix quickly.

Can someone from our QE try to reproduce the issue on a windows machine? Jindro? Thanks.
Comment 7 big_al 2008-08-04 10:23:07 UTC
The problem has been there since I started using daily builds (20080730).

Operating System: Yes, I'm using Windows XP
File System: I'm using local storage only

For all builds I've started with a clean userdir

Please check thread on the the NetCAT mailing list with the subject: "[65cat][j2ee] JSP editor performance degraded to a
point where it is unusable". Many users seems to have this problem.

I should note that I haven't tested it with a NetBeans Web Project, but instead as a Maven Web Application project.

The project I'm testing it on is fairly small. Approx. 10 JSP pages and 10 backing beans.
Comment 8 big_al 2008-08-04 10:24:55 UTC
Furthermore the system also freezes when invoking source formatting.
Comment 9 Marek Fukala 2008-08-04 10:36:44 UTC
The issue may be caused by recent fix of issue 139087. QE is trying to reproduce on older builds...

As for the formatting problem, there is a P2 issue 142011.
Comment 10 big_al 2008-08-04 10:44:41 UTC
Doesn't seem to be the same as 142011 as the formatting eventually finished but only after 10-15 seconds (sometimes
more). I will try todays build and see if the issue has been fixed.
Comment 11 Jindrich Sedek 2008-08-04 13:08:07 UTC
I'm not able to reproduce the same stacktrace as the attached one, but I'm attaching different one. It's reproducible on
latest build. Cpu start running for 100% few seconds after doing edit action in JSP file.
Comment 12 Jindrich Sedek 2008-08-04 13:08:42 UTC
Created attachment 66480 [details]
threaddump
Comment 13 Marek Fukala 2008-08-04 13:22:40 UTC
I can reproduce the same issue as Jindra with JSPWiki project. If I edit a JSP file in the WP, the parser run is very
fast. But if I invoke a jsp completion there is about 4 seconds delay with a high CPU activity - the parser accesses
some project jar files as is visible from jsedek's last attachement.

Reassining to jsp parser for more evaluation. Tere were two changes recently - one in the mentioned issue 139087 and one
done by Petr Hejl in web apps classloading, which could possibly cause this.

OTOH the stacktraces originally reported by big_al are different.
Comment 14 Tomas Mysik 2008-08-04 19:02:21 UTC
I'm looking at it.
Comment 15 Tomas Mysik 2008-08-05 11:18:17 UTC
The cause of this issue is the fix of the issue #128360 - I will backout that fix and try to solve it a bit 
differently.
Comment 16 Tomas Mysik 2008-08-05 13:14:21 UTC
Fixed in trunk - could someone verify please? I would backport it to the beta clone as well. Thanks.
http://hg.netbeans.org/main?cmd=changeset;node=46d26934af9d
Comment 17 big_al 2008-08-05 20:58:17 UTC
It seems to have improved, although I haven't been able to verify it with my Maven projects (as Maven J2EE support seems
to be broken in the latest build.
Comment 18 David Konecny 2008-08-05 23:44:16 UTC
If you just backed out a recent change than there is not much need for a verification, no?
Comment 19 Quality Engineering 2008-08-06 04:28:05 UTC
Integrated into 'main-golden', available in build *200808060201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/46d26934af9d
User: Tomas Mysik <tmysik@netbeans.org>
Log: #142684: [65cat] JSP editor sluggish on auto complete and save

Backed out changeset 3a5b4ac5d752
Comment 20 Tomas Mysik 2008-08-06 08:42:24 UTC
> If you just backed out a recent change than there is not much need for a verification, no?

It is because I'm not really sure that this is the only cause of this issue - I verified using profiler but also need 
feedback from real, everyday work.
Comment 21 Jindrich Sedek 2008-08-06 09:01:48 UTC
NetBeans IDE Dev (Build 20080806033315)
verified.