Review Request 123930: Reduce temporary allocations.
Milian Wolff
mail at milianw.de
Sat May 30 17:14:22 UTC 2015
> On May 29, 2015, 7:26 p.m., Kåre Särs wrote:
> > Having a static cache sounds reasonable to me and I think it might be a good change, but I'll let people with more experience with sonnet give the thumbs up or down.
> >
> > Meanwhile I wonder why ktexteditor calls m_backgroundChecker->setSpeller(m_speller) on every cal to performSpellCheck().
the language may have changed. with my patches shown here it's also OK to do that.
- Milian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123930/#review80953
-----------------------------------------------------------
On May 30, 2015, 5:13 p.m., Milian Wolff wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123930/
> -----------------------------------------------------------
>
> (Updated May 30, 2015, 5:13 p.m.)
>
>
> Review request for KDE Frameworks and Martin Tobias Holmedahl Sandsmark.
>
>
> Repository: sonnet
>
>
> Description
> -------
>
> Access setting's default language directly without constructing
> temporary Speller objects, which is extremely costly with the
> internal dictionary loading.
>
> Also, don't create the speller object and then set the language
> afterwards, pass it directly to the ctor. This removes a potential
> pessimization when the language is not equal to the default language.
>
> Use one central cache for the SpellerPlugins.
>
> Creating these speller plugins is very expensive and the data
> they operate on can / should be shared as much as possible.
>
> This speeds up automatic spell checking immensely, especially
> when automatic language detection is enabled.
>
> REVIEW: 123930
>
>
> Diffs
> -----
>
> src/core/guesslanguage.cpp d83a06d64fea4fc1c3e8439861c574bc14b6337d
> src/core/languagefilter.cpp cbd57a248621dac732863f62d99463770f96190b
> src/core/loader.cpp 79fa2bfee77f8bbef2aa6e5fbc0699528b8a7a6d
> src/core/loader_p.h 120e709627d4a48c305b9b2a813b5e8cf4fb64f6
> src/core/speller.cpp dcf98eccb2d82642dc2efe0145ad7ba9a814505f
>
> Diff: https://git.reviewboard.kde.org/r/123930/diff/
>
>
> Testing
> -------
>
> ran katepart again - much quicker now, even with auto-language-detection enabled! unit test still work as well.
>
>
> Thanks,
>
> Milian Wolff
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150530/08c1c0e9/attachment.html>
More information about the Kde-frameworks-devel
mailing list