Bug 203827 - Minimize TextLayout creation and processing to improve performance
Minimize TextLayout creation and processing to improve performance
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: Painting & Printing
7.0
PC All
: P2 (vote)
: 7.2
Assigned To: Miloslav Metelka
issues@editor
:
: 196581 197136 200560 201570 202255 204856 204988 206016 207029 207258 207313 208079 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-17 13:49 UTC by Miloslav Metelka
Modified: 2012-06-06 13:10 UTC (History)
22 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miloslav Metelka 2011-10-17 13:49:03 UTC
TextLayout creation is costly. The view hierarchy should attempt to minimize text layout creation as much as possible to improve performance.
Comment 1 Miloslav Metelka 2011-10-17 13:52:11 UTC
*** Bug 196581 has been marked as a duplicate of this bug. ***
Comment 2 Miloslav Metelka 2011-10-17 13:53:07 UTC
*** Bug 197136 has been marked as a duplicate of this bug. ***
Comment 3 Miloslav Metelka 2011-10-17 14:05:03 UTC
*** Bug 200560 has been marked as a duplicate of this bug. ***
Comment 4 Miloslav Metelka 2011-10-18 07:45:40 UTC
*** Bug 201570 has been marked as a duplicate of this bug. ***
Comment 5 Miloslav Metelka 2011-10-20 13:38:12 UTC
In addition I will change priority of changes reported by EditorViewFactory into a Type that will be either:

REGULAR - typical change that only affects font and highlighting of characters but not paragraph view boundaries.

PARAGRAPH_CHANGE - change that affects paragraph view boundaries so it needs urgent rebuild of the affected area to determine new paragraph views boundaries.

SETTINGS_CHANGE - for broad changes such as recreation of layers managed by HighlightingManager or some other settings-related changes. View hierarchy will rebuild its paragraph views from scratch and re-measures the fonts being used and resulting line height.

This will allow more deferred views recomputation and better text layout reusal.
Comment 6 Miloslav Metelka 2012-01-28 20:36:32 UTC
Fixed at last. With this patch long lines should display fine both in non-wrapped mode and line-wrapped mode. Typing speed in long lines depends on line-wrapping type - wrap after words is faster since not all characters get moved upon each typed character.
Text layout are reused where possible and, for long lines, they are split roughly by 1K. Also there's a cache for text layout splits so it helps to speed up building of wrap lines considerably.
TestRootView-based tests were reworked and several new tests were added.

http://hg.netbeans.org/jet-main/rev/b6041b6ecd29
Comment 7 Miloslav Metelka 2012-01-30 15:05:45 UTC
Additional fix:
http://hg.netbeans.org/jet-main/rev/2537fea39bb1
Comment 8 Miloslav Metelka 2012-02-02 12:43:30 UTC
One additional fix:
http://hg.netbeans.org/jet-main/rev/c204196809bf
Comment 9 Miloslav Metelka 2012-02-21 09:29:51 UTC
*** Bug 204988 has been marked as a duplicate of this bug. ***
Comment 10 Miloslav Metelka 2012-02-21 12:45:00 UTC
*** Bug 207029 has been marked as a duplicate of this bug. ***
Comment 11 Miloslav Metelka 2012-02-22 15:30:31 UTC
*** Bug 206016 has been marked as a duplicate of this bug. ***
Comment 12 Miloslav Metelka 2012-02-23 10:58:12 UTC
*** Bug 207313 has been marked as a duplicate of this bug. ***
Comment 13 Miloslav Metelka 2012-02-23 15:03:54 UTC
*** Bug 207258 has been marked as a duplicate of this bug. ***
Comment 14 Miloslav Metelka 2012-02-23 15:10:06 UTC
*** Bug 208079 has been marked as a duplicate of this bug. ***
Comment 15 Miloslav Metelka 2012-05-18 08:12:05 UTC
*** Bug 202255 has been marked as a duplicate of this bug. ***
Comment 16 Miloslav Metelka 2012-06-06 13:10:25 UTC
*** Bug 204856 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo