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 114312 - [Navigator] Heavy usage of NbDocument.findLineNumber()
Summary: [Navigator] Heavy usage of NbDocument.findLineNumber()
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: languages (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@obsolete
URL:
Keywords:
Depends on:
Blocks: 110302 114234
  Show dependency tree
 
Reported: 2007-08-31 08:50 UTC by Marek Fukala
Modified: 2007-08-31 09:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The screenshot of the profiler window showing calltree with the many calls to NbDocument.findLineNumber() (79.10 KB, image/png)
2007-08-31 08:55 UTC, Marek Fukala
Details
Netbeans profiler snapshot for first keystroke in html editor (485.02 KB, application/octet-stream)
2007-08-31 09:01 UTC, Marek Fukala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Fukala 2007-08-31 08:50:53 UTC
The generic Schlieman navigator implementation uses Line-s and LineSet-s to store the nodes positions. In some
situations, this leads to a huge number of binary search over the document in NbDocument.findLineNumber() which is slow.
For ilustration just open the attached screenshot from netbeans profiler and look at the expanded calltree. The document
has just 140 lines with 82 nodes and the NbDocument.findLineNumber() is called 6210 times. Basically the
DocumentLine$Set.getCurrent(int) consumes about 50% of time spent in AWT thread during the measurement!
Comment 1 Marek Fukala 2007-08-31 08:55:03 UTC
Created attachment 47857 [details]
The screenshot of the profiler window showing calltree with the many calls to NbDocument.findLineNumber()
Comment 2 Marek Fukala 2007-08-31 09:01:02 UTC
Created attachment 47858 [details]
Netbeans profiler snapshot for first keystroke in html editor
Comment 3 Jan Jancura 2007-08-31 09:18:32 UTC
should already be fixed.