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 42723

Summary: Slow DocumentLine.Set Line.Set implementation
Product: platform Reporter: _ pkuzel <pkuzel>
Component: TextAssignee: Petr Nejedly <pnejedly>
Status: VERIFIED DUPLICATE    
Severity: blocker Keywords: PERFORMANCE
Priority: P3    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 42600    

Description _ pkuzel 2004-05-03 15:27:31 UTC
I suspect that issue 42600 is caused by
suprisingly slow line operations. In memory
document with about 1000 lines takes about 10sec.

Thread dump snippers:

...
org.openide.text.PositionRef$Manager$PositionKind.getLine(PositionRef.java:473)
org.openide.text.PositionRef.getLine(PositionRef.java:136)
org.openide.text.DocumentLine.getLineNumber(DocumentLine.java:93)
org.openide.text.DocumentLine.equals(DocumentLine.java:207)
...

...
org.openide.text.PositionRef.getLine(PositionRef.java:136)
org.openide.text.DocumentLine.getLineNumber(DocumentLine.java:93)
org.openide.text.DocumentLine.equals(DocumentLine.java:207)
java.util.WeakHashMap.eq(WeakHashMap.java:252)
java.util.WeakHashMap.get(WeakHashMap.java:344)
org.openide.text.Line$Set.registerLine(Line.java:336)
org.openide.text.DocumentLine$Set.access$101(DocumentLine.java:781)
org.openide.text.DocumentLine$1DocumentRenderer.run(DocumentLine.java:916)
org.netbeans.editor.BaseDocument.render(BaseDocument.java:883)
org.openide.text.DocumentLine$Set.safelyRegisterLine(DocumentLine.java:920)
org.openide.text.DocumentLine$Set.getCurrent(DocumentLine.java:894)
...

...
org.netbeans.editor.BaseDocument.render(BaseDocument.java:883)
org.openide.text.DocumentLine$Set.safelyRegisterLine(DocumentLine.java:920)
org.openide.text.DocumentLine$Set.getCurrent(DocumentLine.java:894)
...
Comment 1 Petr Nejedly 2004-06-01 13:34:14 UTC

*** This issue has been marked as a duplicate of 43484 ***
Comment 2 Marian Mirilovic 2005-07-12 10:17:54 UTC
closed