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 232409 - org.netbeans.editor.CodeFoldingSideBar.paintComponent: LowPerformance took 65617 ms.
Summary: org.netbeans.editor.CodeFoldingSideBar.paintComponent: LowPerformance took 65...
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2013-07-08 21:26 UTC by Exceptions Reporter
Modified: 2016-07-07 07:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 174667


Attachments
nps snapshot (188.05 KB, application/nps)
2013-07-08 21:26 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-07-08 21:26:51 UTC
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
Comment 1 Exceptions Reporter 2013-07-08 21:26:54 UTC
Created attachment 136840 [details]
nps snapshot
Comment 2 Milutin Kristofic 2013-07-15 14:11:17 UTC
Svata, can you please look at this, it's xml formating and code folding sidebar, both your components. Thanks
Comment 3 Svata Dedic 2013-08-01 13:43:19 UTC
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.
Comment 4 Miloslav Metelka 2013-08-07 09:17:51 UTC
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 ...".
Comment 5 Martin Balin 2016-07-07 07:30:22 UTC
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