Chromium Code Reviews
DescriptionOptimizations to Spellchecking Chunk Generation
1. The existing implementation frequently does translations between
offsets and positions, and each translation needs to scan from the
beginning of the text paragraph. The patch avoids such translations
completely.
2. Only the first chunk needs to have both of its start and end
positions expanded to sentence boundaries. For each subsequent chunk, we
only need to expand its end position to sentence boundary. Hence, we can
reduce the number of calls of startOfSentence to 1 regardless of the
number of chunks generated.
BUG=109587
Committed: https://crrev.com/b0f70be05379a033d47c4eb7d5a389b546338044
Cr-Commit-Position: refs/heads/master@{#368035}
Patch Set 1 #
Messages
Total messages: 11 (5 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||