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: | Editor very slow in rendering single line javascript/css files resulting in Netbeans hang | ||
---|---|---|---|
Product: | editor | Reporter: | Sonali Kochar <sonali> |
Component: | Painting & Printing | Assignee: | Miloslav Metelka <mmetelka> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | issues |
Priority: | P4 | Keywords: | PERFORMANCE |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 121357, 150204 | ||
Bug Blocks: |
Description
Sonali Kochar
2008-10-30 22:35:27 UTC
Milo, please evaluate. Thanks I was able to reproduce the problem in current dev build. There does not seem to be anything wrong but I will continue profiling of the highlighting layers to search for improvements. The single-line javascript has ~100K of text. I personally don't see what's a benefit for the user to see 100K of text on a single line. IMHO the line should be reformatted into a regular indented text so that the user can orient in it. I'm downgrading to P3 since this is not a typical editing usecase. I have made some additional profiling. There are 1) 103389 chars in the js-script-min.js document. 2) 7 BaseDocument.insertString() invocations (there is a buffer with 16384 chars for insertions). These could be collapsed into a single insert by reallocating the buffer before the actual insert but I consider that non-systematic. 3) 38804 tokens in the document. I see two problems: a) Since almost all the chars are on a single line each repetitive insertion in 2) causes re-measurement of the particular line in the view hierarchy (DrawEngineLineView.getPreferredSpan() gets called leading to DrawEngine.draw() called for measurements). - A new view hierarchy (issue 121357) should improve the situation considerably since the views will maintain their span internally so there will be no additional re-measurements done. b) Token hierarchy is updated after each sub-insert in 2) leading to repetitive updates of syntax highlighting layer. - This should be improved by switching the TH off before document loading and on after the loading - issue 150204 (planned for 7.0). I have added some logging of syntax highlighting and token hierarchy events and views rebuilding: http://hg.netbeans.org/main/rev/d29e247a6daa Integrated into 'main-golden', will be available in build *200811071401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/d29e247a6daa User: Miloslav Metelka <mmetelka@netbeans.org> Log: #151916 - Editor very slow in rendering single line javascript/css files resulting in Netbeans hang. Bug prior to 7.0, not touched for the last 2 years --> P4. I think this was fixed long ago by Mila. |