Review Request 123930: Reduce temporary allocations.

Milian Wolff mail at milianw.de
Tue Jun 2 21:13:12 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123930/
-----------------------------------------------------------

(Updated June 2, 2015, 9:13 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Frameworks, David Faure, Laurent Montel, Martin Tobias Holmedahl Sandsmark, and Kåre Särs.


Changes
-------

Submitted with commit 779a676d46567df4db29445e689ff9ddb6368616 by Milian Wolff to branch master.


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/20150602/165c234d/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list