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.
Build: NetBeans IDE 7.3 (Build 201306052037) VM: Java HotSpot(TM) 64-Bit Server VM, 23.5-b02, Java(TM) SE Runtime Environment, 1.7.0_09-b05 OS: Windows 7 User Comments: GUEST: auto-formatting a web.confile file Maximum slowness yet reported was 65617 ms, average is 63632
Created attachment 136840 [details] nps snapshot
Svata, can you please look at this, it's xml formating and code folding sidebar, both your components. Thanks
The CF Sidebar waits for 'just' a readlock on the document. The formatter itself is IMHO not the culprit, but for some reason, rebuilding of the editor views takes a long time - inside some callback made from within insertString(). It seems that a write-lock is held during the view rebuilding. Reassigning to Painting. It *could* be possible for the CF Sidebar to cache last computed layout; it could repaint without querying the document and/or Fold Hierarchy. The cache would have to be reset on either editor view change affecting Y positions, or fold hierarchy change - I am not sure whether it would visually help in this case. Milo / Mito - please advise.
IMHO we should improve the painting code to detect that a long-running task occurs on the document and do not even attempt to take a readlock. Instead we should possibly display a message (provided by the long-running action) over the editor pane's area explaining what is being done e.g. "Formatting code ...".
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss