mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
f271c866cf
Removing ranges is expensive. This reduces flickering of the spelling mistakes and prevents 100% CPU usage of 1 core on slower machines. The essence of this patch is, that when text doesn't change, all existing spellchecking ranges are reused. Before this patch, removing ranges was done as part of the time slice in `mozInlineSpellChecker::SpellCheckSlice`. That is, slow removals of ranges contributed to the amount of words to be spellchecked asynchronously. Therefore, the amount of words to be spellchecked in one chunk could increase from the minimum, `INLINESPELL_MINIMUM_WORDS_BEFORE_TIMEOUT` to the maxium `INLINESPELL_MAXIMUM_CHUNKED_WORDS_PER_TASK`. Consequently, the asynchronous checking might take longer. If that turns out to be problematic, reducing `INLINESPELL_MAXIMUM_CHUNKED_WORDS_PER_TASK` could be a fix. Differential Revision: https://phabricator.services.mozilla.com/D116096 |
||
---|---|---|
.. | ||
auth | ||
permissions | ||
pref | ||
spellcheck | ||
universalchardet | ||
build.mk | ||
confvars.sh | ||
moz.build | ||
moz.configure |