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 223634 - org.openide.text.NbDocument$DocumentRenderer.renderToInt: LowPerformance took 31078 ms.
Summary: org.openide.text.NbDocument$DocumentRenderer.renderToInt: LowPerformance took...
Status: REOPENED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords: PERFORMANCE
Depends on: 90901
Blocks:
  Show dependency tree
 
Reported: 2012-12-11 05:53 UTC by Vladimir Voskresensky
Modified: 2015-09-29 14:49 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 196377


Attachments
nps snapshot (453.67 KB, application/nps)
2012-12-11 05:53 UTC, Vladimir Voskresensky
Details
nps snapshot (248.86 KB, application/nps)
2013-02-07 09:25 UTC, Vladimir Voskresensky
Details
Threads dump during freeze (27.85 KB, text/plain)
2013-08-21 12:19 UTC, Vladimir Voskresensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2012-12-11 05:53:30 UTC
This bug was originally marked as duplicate of bug 182614, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 20121210-f9b4a858b524)
VM: Java HotSpot(TM) Client VM, 23.5-b02, Java(TM) SE Runtime Environment, 1.7.0_09-b05
OS: SunOS

User Comments:
vv159170: ask to show file with annotaions for previous hg revision



Maximum slowness yet reported was 31078 ms, average is 31078
Comment 1 Vladimir Voskresensky 2012-12-11 05:53:37 UTC
Created attachment 129185 [details]
nps snapshot
Comment 2 David Strupl 2012-12-11 09:13:54 UTC
I am sorry but I am marking this as wontfix. The snapshots shows that there was 17s spent in less than 1000 invocations of java.lang.Object.notify(). I think this might be some Solaris oddity. It would need a Solaris expert to further explain how is this possible. I don't think this one reports is worth a lengthy examination. Closing. If you disagree please read the snapshot and suggest what could be done for this not to happen.
Comment 3 Vladimir Voskresensky 2013-02-07 09:11:09 UTC
David. I just got the issue on Linux. Freeze is for 50 sec. Mila, please, have a look, what's going on.
EDT was doing:
"AWT-EventQueue-1" prio=10 tid=0xa06c5400 nid=0x20b9 runnable [0x9dfcb000]
   java.lang.Thread.State: RUNNABLE
	at java.lang.Object.notify(Native Method)
	at javax.swing.text.AbstractDocument.readUnlock(AbstractDocument.java:1408)
	- locked <0xcd155d48> (a org.netbeans.modules.editor.NbEditorDocument)
	at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1385)
	at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:897)
	at org.openide.text.NbDocument.findLineNumber(NbDocument.java:161)
	at org.openide.text.PositionRef$Manager$DocumentRenderer.run(PositionRef.java:993)
	at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1383)
	at org.openide.text.PositionRef$Manager$DocumentRenderer.render(PositionRef.java:895)
	at org.openide.text.PositionRef$Manager$DocumentRenderer.renderToInt(PositionRef.java:932)
	at org.openide.text.PositionRef$Manager$PositionKind.getLine(PositionRef.java:520)
	at org.openide.text.PositionRef.getLine(PositionRef.java:174)
	at org.openide.text.DocumentLine.getLineNumber(DocumentLine.java:126)
	at org.openide.text.DocumentLine.equals(DocumentLine.java:256)
	at java.util.WeakHashMap.eq(WeakHashMap.java:259)
	at java.util.WeakHashMap.put(WeakHashMap.java:406)
	at org.openide.text.Line$Set.registerLine(Line.java:570)
	- locked <0xd126ac58> (a java.util.WeakHashMap)
	at org.openide.text.DocumentLine$Set.access$201(DocumentLine.java:945)
	at org.openide.text.DocumentLine$Set$1DocumentRenderer.run(DocumentLine.java:1114)
	at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1383)
	at org.openide.text.DocumentLine$Set.safelyRegisterLine(DocumentLine.java:1120)
	at org.openide.text.DocumentLine$Set.getOriginal(DocumentLine.java:1040)
	at org.openide.text.LazyLines.createDelegate(LazyLines.java:69)
	at org.openide.text.LazyLines.getDelegate(LazyLines.java:77)
	- locked <0xcdd40c40> (a org.openide.text.LazyLines)
	at org.openide.text.LazyLines.size(LazyLines.java:160)
	at org.netbeans.modules.mercurial.util.HgUtils$1.run(HgUtils.java:1356)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:666)
	at java.awt.EventQueue.access$400(EventQueue.java:81)
	at java.awt.EventQueue$2.run(EventQueue.java:627)
	at java.awt.EventQueue$2.run(EventQueue.java:625)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:636)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 4 Vladimir Voskresensky 2013-02-07 09:25:30 UTC
Created attachment 131084 [details]
nps snapshot

show annotations for previous version
Comment 5 Vladimir Voskresensky 2013-08-21 12:18:51 UTC
show previous HG annotations - 71 sec 
http://statistics.netbeans.org/exceptions/exception.do?id=687371
Comment 6 Vladimir Voskresensky 2013-08-21 12:19:43 UTC
Created attachment 138996 [details]
Threads dump during freeze

dump during 71 sec freeze
Comment 7 Miloslav Metelka 2013-08-28 13:11:28 UTC
IMHO this is related to issue #90901. If there are many DocumentLine objects for the source then performance can become poor.
Comment 8 _ gtzabari 2015-09-29 14:49:48 UTC
Please update Target Milestone.