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.
Summary: | Noticable slowdown when scrolling by cursor in long HTML | ||
---|---|---|---|
Product: | web | Reporter: | Jiri Kovalsky <jkovalsky> |
Component: | HTML Editor | Assignee: | Marek Fukala <mfukala> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | issues, mfukala |
Priority: | P2 | Keywords: | PERFORMANCE |
Version: | 4.x | ||
Hardware: | PC | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 41508 | ||
Bug Blocks: | |||
Attachments: |
HTML file where bug is reproducible.
The invocation tree showing method calls in the getPositionBelow() method Now the some invocation tree with correct mimetype :-) |
Description
Jiri Kovalsky
2005-02-25 15:24:23 UTC
Created attachment 20523 [details]
HTML file where bug is reproducible.
This is performance issue. The problem is caused by method org.netbeans.editor.Utilities.getPositionBelow(...) called from org.netbeans.editor.BaseKit$DownAction class. This method is called after each press of down arrow key and it takes very long time. This method now only delegates to javax.swing.text.Utilities.getPositionBelow(...) method which is so slow. It used to compute the position by itself, but it was changed on Jan 09th, 2004 by Milas's commit "Code Folding integration to main trunk" rev. 1.63. I need more information from editor guys to be able to set TM. The Issue #41508 is very likely the source of the problem. Too long lines causes that the avax.swing.text.Utilities.getPositionBelow(...) is terribly slow. I am attaching a call tree graph from JProfiler created in following way: 1) open the Jiri's HTML file 2) delete 2/3 of lines in the file 3) jump to the beginning of the file 4) set cursor onto last visible row 5) press down array key => from the call tree graph it is perfectly visible that one call to getPositionBelow() causes 20408 calls of org.netbeans.editor.Syntax.nextToken() and then the some amount of calls to org.netbeans.editor.DrawEngine.drawCurrentToken(). The some line is reparsed and repainted 370 times!!! I would like to ask Jirka Kovalsky to reconside priority of this issue. This is IMO a P2. Created attachment 20594 [details]
The invocation tree showing method calls in the getPositionBelow() method
Created attachment 20595 [details]
Now the some invocation tree with correct mimetype :-)
The Issue #41508 which this issue depends on is going to be fixed in 4.1 => setting TM accordingly Since this usecase comes from real-life usage of HTML editor and it is really not funny I am upgrading priority of this issue. Actually I wanted to file this as P2 originally. Please make sure the editor is usable not only with fresh HTMLs generated from templates. Issue #41508 has been fixed => closing this one as well. Please reopen if you feel that the navigation is still too slow. Okay, I agree it was improved though it still "jumps". Anyway, verifying in development build #200503232205 of NetBeans 4.1. |