|
Optimization to previousBoundary() and nextBoundary()
This is an all-in-one patch only for reference purposes. It
will be split into the following parts for review:
1. Add |characterAt()| to |TextIterator| (landed).
2. Make sure |TextIterator| and |SimplifiedBackwardsTextIterator|
always copy whole code points (at least on well-formed UTF-16) (landed).
3. Introduce the |TextBuffer<Direction>| class for efficiently
concatenating text extracted from text iterators. Specifically,
- |TextBuffer<TextBufferForwards>| performs appendings efficiently
- |TextBuffer<TextBufferBackwards>| performs prependings efficiently
The class is implemented as a wrapper of |WTF::Vector|.
4. Detemplatize |copyTextTo()|, fixing its output type as |TextBuffer|.
5. Introduce the |TextAccumulator<Buffer>| class, which wraps |TextBuffer|
and handles text accumulation progressively. The purpose is to prevent
swallowing a huge text node all at once.
6. Optimize |previousBoundary()| and |nextBoundary()| with |TextAccumulator|.
(7. Search for some other places where applying |TextAccumulator| improves
performance.)
BUG= 109587
Total comments: 6
Total comments: 1
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+367 lines, -130 lines) |
Patch |
 |
M |
third_party/WebKit/Source/core/editing/VisibleUnits.cpp
|
View
|
1
2
3
4
5
6
7
|
7 chunks |
+22 lines, -34 lines |
2 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/CharacterIterator.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/CharacterIterator.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/SearchBuffer.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.h
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+4 lines, -25 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+35 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIteratorTest.cpp
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+18 lines, -18 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/Source/core/editing/iterators/TextAccumulator.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+76 lines, -0 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/Source/core/editing/iterators/TextBuffer.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+134 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/TextIterator.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+3 lines, -12 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/TextIteratorTest.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+16 lines, -16 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -19 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/WordAwareIterator.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/mac/WebSubstringUtil.mm
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 24 (10 generated)
|