Bug 187337 - JSP editor hanging
JSP editor hanging
Status: VERIFIED FIXED
Product: javaee
Classification: Unclassified
Component: JSP
6.x
All All
: P2 (vote)
: 7.0
Assigned To: Marek Fukala
issues@javaee
EXCEPTIONS_REPORT perf-profileme 69pa...
: PERFORMANCE
: 188467 188509 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-08 14:29 UTC by rharms
Modified: 2010-07-12 10:49 UTC (History)
12 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
nps snapshot (18.02 KB, application/nps)
2010-06-08 14:30 UTC, rharms
Details
nps snapshot (4.07 KB, application/nps)
2010-06-09 11:27 UTC, altosch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rharms 2010-06-08 14:29:56 UTC
This issue was reported manually by tpavek.
It already has 2 duplicates 


Build: NetBeans IDE 6.9 RC2 (Build 201005312001)
VM: Java HotSpot(TM) 64-Bit Server VM, 16.3-b01-279, Java(TM) SE Runtime Environment, 1.6.0_20-b02-279-10M3065
OS: Mac OS X

User Comments:
rharms: Editing a JSP in a freeform project. Almost impossible to use NB with this hang - even the slightest change to page causes a hang.



Maximum slowness yet reported was 11361 ms, average is 11074
Comment 1 rharms 2010-06-08 14:30:01 UTC
Created attachment 99900 [details]
nps snapshot
Comment 2 Tomas Pavek 2010-06-08 14:36:25 UTC
Originally reported in bug 184893. I've found two similar slowness reports showing editor waiting long on JSP fold manager, and created separate bug.

User 'rharms' marked the problem as 6.9 stopper in the community acceptance survey. Could be a good candidate for 6.9.1.
Comment 3 altosch 2010-06-09 11:27:39 UTC
Created attachment 99933 [details]
nps snapshot
Comment 4 velodiver 2010-06-09 17:08:52 UTC
I am seeing the same behavior(Beta2). It was also present in Beta1.

I use a free form project.
Comment 5 Marek Fukala 2010-06-10 09:17:40 UTC
The JspFoldManager uses the obsolete editor syntax classes. Upon each text tokenization (SyntaxSupport.getTokenChain()) a JspKit.createSyntax(Document d) is called. Creation of the JSP syntax requires creation of a JavaSyntax instance for a particular source level. The source level is obtained by JavaKit.jkit.getSourceLevel((BaseDocument)doc) which calls SourceLevelQuery.getSourceLevel() which is slow.

Proper solution is not to use syntax, which may happen in 6.9.next.

A simple fix is to cache the Syntax instances for JavaSyntax and HtmlSyntax.
Comment 6 Marek Fukala 2010-06-10 09:24:47 UTC
fixed in web-main#dd9dd85d397f by weakly caching the JavaSyntax instance per Document.
Comment 7 Quality Engineering 2010-06-11 06:55:10 UTC
Integrated into 'main-golden', will be available in build *201006110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/dd9dd85d397f
User: Marek Fukala <mfukala@netbeans.org>
Log: #187337 -  JSP editor hanging
Comment 8 velodiver 2010-06-21 14:31:06 UTC
This is NOT fixed in 6.9.  Free-form project.  JSP editor hangs for 2-3 seconds with every edit.
Comment 9 Tomas Pavek 2010-06-21 16:22:07 UTC
For now it's fixed in dev trunk. Considering for 6.9.1 update.

velodiver, could you help us verify the fix in current dev builds? Thanks
http://bits.netbeans.org/download/trunk/nightly/latest/
Comment 10 rharms 2010-06-21 17:18:24 UTC
I've been using the 201006130001 daily build of NetBeans, and the JSP editor has not been hanging.
Comment 11 Marek Fukala 2010-06-22 07:26:43 UTC
I was just helping Tomasz fixing "his" JSP issues, so I would prefer Tomasz to handle this. Thanks.
Comment 12 Marek Fukala 2010-06-22 15:29:41 UTC
There is still a performance problem in JSPs in a free-form project. My previous fix fails here since the  SourceLevelQuery.getSourceLevel() returns null so the cache is not used.

fixed in web-main#9d534efabd15

I'm sorry for the complications.

Thanks Martine for your effort in helping me reproducing the problem.

Please verify in trunk so I can then transplant to 691
Comment 13 Marek Fukala 2010-06-22 15:30:02 UTC
closing as fixed then
Comment 14 Martin Schovanek 2010-06-22 16:54:13 UTC
Verified in the trunk build. Please transplant into 691.
Thanks Marku for the fix.
Comment 15 Marek Fukala 2010-06-23 11:23:47 UTC
transplanted into release691 clone:

http://hg.netbeans.org/release691/rev/5571a40f2733
http://hg.netbeans.org/release691/rev/afaa033f3420
Comment 16 Quality Engineering 2010-06-24 03:33:24 UTC
Integrated into 'main-golden', will be available in build *201006240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9d534efabd15
User: Marek Fukala <mfukala@netbeans.org>
Log: #187337/2 - JSP editor hanging
Comment 17 Vitezslav Stejskal 2010-07-09 11:04:29 UTC
*** Bug 188467 has been marked as a duplicate of this bug. ***
Comment 18 Vitezslav Stejskal 2010-07-12 10:49:30 UTC
*** Bug 188509 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo