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 177972

Summary: Source --> Format slow: (AWT thread blocked for 63138 ms).
Product: xml Reporter: Exceptions Reporter <exceptions_reporter>
Component: Text-EditAssignee: Svata Dedic <sdedic>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kiroff
Priority: P3 Keywords: PERFORMANCE
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 158483
Attachments: nps snapshot
nps snapshot
nps snapshot

Description Exceptions Reporter 2009-12-02 01:24:55 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-4379-on-091125)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.1-b02-90, Java(TM) SE Runtime Environment, 1.6.0_15-b03-219
OS: Mac OS X, 10.6.2, x86_64

User Comments:
velodiver: accessing files in IDE

jpleed3: Trying to work on a Facelets file, this issue happens constantly and consistently during editing of xhtml files, deadlocks of 5-15 sec are common.

GUEST: Source->Format


Maximum slowness yet reported was 63138 ms, average is 17182
Comment 1 Exceptions Reporter 2009-12-02 01:25:00 UTC
Created attachment 91973 [details]
nps snapshot
Comment 2 Vitezslav Stejskal 2009-12-02 02:15:10 UTC
#261391 - the same as #261397
#261397 - o.n.m.web.jsf.editor.hints.ElChecker incorrectly (?) uses doc.runAtomic rather than just doc.render
#307804 - PropertiesDataObject's parsing, this time triggered from ExplorerManager's setSelectedNode
#309664 - actionGlobalContext() queried for ActionMap, triggered lookup update and PropertiesDataObject started parsing a properties file
#312590 - a format action write-locked a document, which prevented JEP from repainting (need read-lock)
Comment 3 Exceptions Reporter 2010-01-14 09:21:02 UTC
Created attachment 93293 [details]
nps snapshot
Comment 4 Exceptions Reporter 2010-01-27 07:34:31 UTC
Created attachment 93602 [details]
nps snapshot
Comment 5 David Strupl 2010-03-17 16:29:25 UTC
#261391, #261397 - made separate issue
#307804, #309664 - made separate issue

I have marked the method render as "innocent" so the new duplicates will not end up with this report.
Comment 6 David Strupl 2010-03-18 09:26:00 UTC
The formatting in XML obtains readLock in BaseDocument.render and then calls doReformat which will eventually try to obtain write lock on the document. This is wrong. Re-assigning to xml for evaluation.
Comment 7 Petr Cyhelsky 2012-11-07 15:48:15 UTC
no new report in more than 3 releases - seems to be fine new