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.
Summary: | JspKit.createSyntax slow - LowPerformance took 9988 ms. | ||
---|---|---|---|
Product: | javaee | Reporter: | Alexander Simon <alexvsimon> |
Component: | JSP | Assignee: | issues@javaee <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexvsimon, cyhelsky |
Priority: | P3 | Keywords: | PERFORMANCE |
Version: | 7.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 187671 |
Attachments: | nps snapshot |
Description
Alexander Simon
2012-05-04 19:09:25 UTC
Created attachment 119099 [details]
nps snapshot
The last report seems to be from JSP - please evaluate. As for the latest JSP related reports - it seems to be either JVM totally out of resources or some faulty snapshot as according to it the PropertyChangeSupport.addPropertyChangeListener() takes 11 seconds. Closing. The JSPKit.createSyntax() is called many times which seems to be the problem *** Bug 211925 has been marked as a duplicate of this bug. *** Each SyntaxElement.getNext() causes the whole syntax to reinitialize (BaseDocument.getFreeSyntax()) which then calls the JspKit.createSyntax() which attaches the listener to the JspColoringData but seems to never free it. That's likely the reason why adding the listener is so slow as there might be millions of them. I tried to find some elegant and right solution of the problem, but it would require to rewrite or copy parts of the code which I personally consider as a subject of total redesign so I just did a simple workaround. BTW, if a client of SyntaxElement needs to traverse the whole chain of elements( as the JspFoldManager) the current implementation is extremely inefficient as it recreates the tokens chain and the syntax several times for each of the elements. web-main#70a94ba1d8d1 Integrated into 'main-golden', will be available in build *201301040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/70a94ba1d8d1 User: Marek Fukala <mfukala@netbeans.org> Log: #212105 - JspKit.createSyntax slow - LowPerformance took 9988 ms. |