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 226856 - 21s - HtmlHintsProvider holds on Children.MUTEX
Summary: 21s - HtmlHintsProvider holds on Children.MUTEX
Status: RESOLVED DUPLICATE of bug 225925
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: PERFORMANCE
: 226540 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-28 19:42 UTC by Exceptions Reporter
Modified: 2013-06-07 12:01 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 199039


Attachments
nps snapshot (67.87 KB, application/nps)
2013-02-28 19:42 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2013-02-28 19:42:10 UTC
Build: NetBeans IDE 7.3 (Build 201302132200)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.14-b01-445, Java(TM) SE Runtime Environment, 1.6.0_41-b02-445-11M4107
OS: Mac OS X

User Comments:
alesak: deleted php file

GUEST: On git change branch



Maximum slowness yet reported was 21786 ms, average is 20943
Comment 1 Exceptions Reporter 2013-02-28 19:42:13 UTC
Created attachment 132023 [details]
nps snapshot
Comment 2 Jaroslav Tulach 2013-03-26 09:03:40 UTC
AWT-EventQueue is blocked on Node.destroy's call to Mutex.postWriteRequest. The Mutex lock is probably held by parsing thread, and especially HtmlHintsProvider.

21s in production warrants at least P2.
Comment 3 Marek Fukala 2013-05-02 11:10:04 UTC
(In reply to comment #2)
> AWT-EventQueue is blocked on Node.destroy's call to Mutex.postWriteRequest. The
> Mutex lock is probably held by parsing thread, and especially
> HtmlHintsProvider.
Why do you think so?

> 
> 21s in production warrants at least P2.
Comment 4 Jaroslav Tulach 2013-05-09 21:35:16 UTC
> > Mutex lock is probably held by parsing thread, and especially
> > HtmlHintsProvider.
> Why do you think so?

By looking at the content of the npss file I came to the such conclusion. Do you have problems reading npss files?
Comment 5 Marek Fukala 2013-05-10 05:29:03 UTC
Jardo, I have no problem with nps files, but in this case I do not see any code in the parsing thread wich would acquire the mutex.
Comment 6 Jaroslav Tulach 2013-06-06 07:07:55 UTC
(In reply to comment #2)
> > AWT-EventQueue is blocked on Node.destroy's call to Mutex.postWriteRequest.

See
org.openide.nodes.FilterNode.originalDestroyed()	100.0	11,691 ms

> > Mutex lock is probably held by parsing thread, and especially
> > HtmlHintsProvider.
> Why do you think so?

Because it is the only thread that runs 100% of time.

More info. The lock is held by thread that computes:
org.netbeans.modules.csl.navigation.ElementNode$ElementChildren.createNodes()	11,691 ms 
by calling into
org.netbeans.modules.html.editor.gsf.HtmlStructureItem.getNestedItems()11,691 ms
which is then blocked by the parsing thread, see call to
org.netbeans.modules.html.editor.gsf.HtmlStructureItem.runTask() 11,691 ms
and below.
Comment 7 Marek Fukala 2013-06-07 11:27:24 UTC
Thanks for the additional information Jardo.

Passing to CSL then as the nodes implementation lives there and the behaviour where StructureItem-s  create the children items lazily in getNestedItems() using the parsing task has been agreed with Svata.
Comment 8 Marek Fukala 2013-06-07 11:29:51 UTC
*** Bug 226540 has been marked as a duplicate of this bug. ***
Comment 9 Svata Dedic 2013-06-07 12:01:13 UTC
Seems as duplicate of issue #225925; in the current source, getNestedItems() is not called in ElementNode's constructor, but rather from Children.addNotify().

*** This bug has been marked as a duplicate of bug 225925 ***