 Chromium Code Reviews
 Chromium Code Reviews Issue 
            1604783002:
    ALL-IN-ONE: Optimization to previousBoundary() and nextBoundary()  (Closed)
    
  
    Issue 
            1604783002:
    ALL-IN-ONE: Optimization to previousBoundary() and nextBoundary()  (Closed) 
  | DescriptionOptimization 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
   Patch Set 1 #Patch Set 2 : #Patch Set 3 : #
      Total comments: 6
      
     Patch Set 4 : #
      Total comments: 1
      
     Patch Set 5 : Moved surrogate pairing logic to text iterators #Patch Set 6 : Add wrapped vector for efficient prepending #Patch Set 7 : Now we don't need WTFString::prependTo() anymore #Patch Set 8 : #
      Total comments: 2
      
     Messages
    Total messages: 24 (10 generated)
     |