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 206064 - Slow saving JSP and Tag file
Summary: Slow saving JSP and Tag file
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 7.1
Hardware: PC Linux
: P2 normal with 4 votes (vote)
Assignee: Martin Fousek
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2011-12-07 09:58 UTC by Vladimir Riha
Modified: 2012-04-26 10:54 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ide snapshot (13.88 KB, application/octet-stream)
2011-12-07 09:58 UTC, Vladimir Riha
Details
Profiler snapshot (6.68 KB, application/octet-stream)
2012-01-19 15:22 UTC, Petr Jiricka
Details
thread-dump (49.46 KB, text/plain)
2012-02-17 17:56 UTC, Marian Petras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2011-12-07 09:58:41 UTC
Created attachment 113910 [details]
ide snapshot

Steps to reproduce:
- create new Java Web application (Java EE6 Web, GlassFish 3.1.1)
- edit index.jsp and save it
=> saving takes "long" time (about 2s)



Product Version: NetBeans IDE 7.1 (Build 201112062100)
Java: 1.7.0_02; Java HotSpot(TM) Client VM 22.0-b10
System: Linux version 3.0.0-13-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Petr Jiricka 2012-01-19 15:21:25 UTC
I am experiencing this as well, although my snapshot is a bit different. Will attach it.
Comment 2 Petr Jiricka 2012-01-19 15:22:16 UTC
Created attachment 115086 [details]
Profiler snapshot
Comment 3 mani_rt 2012-02-05 18:02:26 UTC
my Version is 7.1 Build 201112071828
Java 1.6.0_24, Debian 6, 
Im also experiencing this issue, with Java Web Application Project, JSP pages with tomct 6 Server.
Tried with With Windows 7 OS ,the Same issue was observed.
whereas Version 7.0 , the same project in the same location did not have this issue.
Comment 4 Petr Jiricka 2012-02-06 14:24:20 UTC
Changing priority to P2 so we don't forget about it. This is pretty annoying.
Comment 5 pranludi 2012-02-07 02:00:51 UTC
I used Netbeans 7.1 on MacOSX Lion( SSD ), Windows 7 32Bit( ssd ), Windows 2008R2 64bit
The Same issue was observed.
Comment 6 verydapeng 2012-02-13 02:50:19 UTC
same issue here 

Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.6.0_30; Java HotSpot(TM) 64-Bit Server VM 20.5-b03
System: Windows 7 version 6.1 running on amd64; Cp1252; en_SG (nb)


this bug is damn annoying
Comment 7 verydapeng 2012-02-16 02:16:46 UTC
A quick profiling run shows the trouble is coming from 

org.netbeans.modules.web.core.jsploader.TagLibParseSupport
public JspParserAPI.JspOpenInfo getCachedOpenInfo(boolean preferCurrent, boolean useEditor) 


this method is called multiple times in a row upon I Ctrl+S

then I changed the implementation to bypass the original processing, and straight away return new JspOpenInfo(false, "UTF-8"); which this is a bit brute force, but it does seem to work 


now my jsp editor is back to normal again
Comment 8 Petr Jiricka 2012-02-16 09:41:29 UTC
I am glad it works for you, however this change is obviously not correct for non-English users. So we will need a better fix.
Comment 9 Marian Petras 2012-02-17 17:56:02 UTC
I attached a thread-dump generated by the NetBeans self-sampler during high CPU activity while editing a JSP file.

It seems there are far too many threads named "JspFoldManager" running (16).
FYI, I had just three JSP files open.
Comment 10 Marian Petras 2012-02-17 17:56:43 UTC
Created attachment 115894 [details]
thread-dump
Comment 11 chunkyks 2012-04-01 02:43:18 UTC
I also am observing this problem. Netbeans 7.1.1 + tomcat that comes with it [7.0.22.0].

Ubuntu 11.10, with Oracle official JDK6r31 in /usr/lib/jvm/jdk1.6.0_31
64-bit Core-i7, 12G memory.

Every time I hit "save" while editing a JSP file, I have a second or two's wait during which the GUI appears locked up.
Comment 12 everflux 2012-04-21 20:41:37 UTC
I can confirm this is still happening in Netbeans 7.1.1, JDK 7u3.
Comment 13 snail 2012-04-25 03:35:02 UTC
I used Netbeans 7.1(Build 201112071828),Java 1.7.0(Java HotSpot(TM) Client VM 21.0-b17) on Windows 7 64Bit( ssd ).

The Same issue was also observed.
Comment 14 Martin Fousek 2012-04-25 05:06:06 UTC
Encoding can be read also from the file content which was impossible to get using FO inputStream in cases that the file was open for write. I'm getting the text from the editor and it looks all right.

Fixed in web-main #40d514a9762a.
Comment 15 Quality Engineering 2012-04-26 10:28:48 UTC
Integrated into 'main-golden', will be available in build *201204260400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/40d514a9762a
User: Martin Fousek <marfous@netbeans.org>
Log: #206064 - Slow saving JSP and Tag file
Comment 16 Vladimir Riha 2012-04-26 10:54:31 UTC
verified, thanks


Product Version: NetBeans IDE Dev (Build 201204260400)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Linux version 3.0.0-17-generic-pae running on i386; UTF-8; en_US (nb)