Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Issue 1563783003: Optimizations to Spellchecking Chunk Generation (Closed)

Created:
4 years, 11 months ago by Xiaocheng
Modified:
4 years, 11 months ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, chromium-reviews, groby+blinkspell_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Optimizations 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -47 lines) Patch
M third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp View 2 chunks +35 lines, -30 lines 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp View 1 chunk +0 lines, -15 lines 0 comments Download

Messages

Total messages: 11 (5 generated)
Xiaocheng
PTAL.
4 years, 11 months ago (2016-01-06 13:19:26 UTC) #3
yosin_UTC9
lgtm So smart! >2. Only the first chunk needs to have both of its start ...
4 years, 11 months ago (2016-01-07 08:34:55 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1563783003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1563783003/1
4 years, 11 months ago (2016-01-07 08:35:33 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 11 months ago (2016-01-07 08:39:56 UTC) #8
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/b0f70be05379a033d47c4eb7d5a389b546338044 Cr-Commit-Position: refs/heads/master@{#368035}
4 years, 11 months ago (2016-01-07 08:41:06 UTC) #10
Xiaocheng
4 years, 11 months ago (2016-01-07 08:43:54 UTC) #11
Message was sent while issue was closed.
On 2016/01/07 at 08:34:55, yosin wrote:
> lgtm
> 
> So smart!
> 
> >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.
> 
> Here is my understanding:
> 
> sentence_1 sentence_2 sentence_3
> 012345678901234577890123456789012
> 
> When chunk size is 15,
> chunk[0] = 0, 10
> chunk[1] = 11, 21
> chunk[2] = 22, 32

Exactly! :)

Powered by Google App Engine
This is Rietveld 408576698