Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: Spell checking is very slow in commit dialog on Windows 8 and later

Project highlights: :. Download .: :. Support .: :. FAQ .: :. Translations .: :. Donate .: :. Report Bug .:

tortoisesvn
Discussion topic

Back to topic list

Re: Spell checking is very slow in commit dialog on Windows 8 and later

Author Ivan Zhakov <ivan at visualsvn dot com>
Full name Ivan Zhakov <ivan at visualsvn dot com>
Date 2016-05-02 06:30:46 PDT
Message On 2 May 2016 at 13:09, Ivan Zhakov <ivan at visualsvn dot com> wrote:
> On 1 May 2016 at 21:57, Stefan Küng <tortoisesvn at gmail dot com> wrote:
>> On 01.05.2016 20:21, Ivan Zhakov wrote:
>>> I've noticed that log message spell checking is extremely slow on
>>> Windows 8 and later.
>>>
>>> It seems that root cause is the fact that Microsoft spell checking API
>>> is implemented as out-of-process DCOM server [1]. TortoiseProc uses
>>> STA apartment, so every MS Spell checking API COM call cause message
>>> pump and WM_PAINT for Scinitilla editor is processed.
>>>
>>> I suggest the following changes to improve spell checker performance
>>> in commit dialog:
>>> 1. Perform styling and spell checking in SCN_STYLENEEDED notification
>>> handler instead of SCN_MODIFIED: The code was using SCN_STYLENEEDED
>>> before r26518 [1]. Commit r26518 justification was that
>>> SCN_STYLENEEDED is called for every repaint. But this was happening
>>> because we didn't update end styled position in editor. Calling
>>> SCI_STARTSTYLING(endpos) and SCI_SETSTYLING(0) after processing
>>> SCN_STYLENEEDED fixes this problem and editor stops sending
>>> SCN_STYLENEEDED notification for every repaint. See attached patch.
>>> This fixes unnecessary repaints during styling Scintilla editor seems
>>> to be smart enough to block repaint during SCN_STYLENEEDED processing.
>>
>> Thanks for the patch.
>> Committed in r27294.
>>
> Thanks for review!
>
>>> 2. Introduce small cache for spell checker. For 1000 words or
>>> something. We checking the same text multiple times during typing, so
>>> this gives huge performance improvement. I've patch in progress, but
>>> it's not ready yet.
>>
>> Looks good. Waiting for your patch.
>>
> This need some refactoring, so I'm going to implement it incrementally
> on trunk if you generally support this idea.
>
Implemented in r27302 (depends on 27301, 27300, 27299, 27298)

--
Ivan Zhakov

« Previous message in topic | 4 of 5 | Next message in topic »

Messages

Show all messages in topic

Spell checking is very slow in commit dialog on Windows 8 and later zhakov Ivan Zhakov 2016-05-01 11:22:07 PDT
     Re: Spell checking is very slow in commit dialog on Windows 8 and later steveking Stefan Küng 2016-05-01 11:57:19 PDT
         Re: Spell checking is very slow in commit dialog on Windows 8 and later Ivan Zhakov <ivan at visualsvn dot com> Ivan Zhakov <ivan at visualsvn dot com> 2016-05-02 03:09:32 PDT
             Re: Spell checking is very slow in commit dialog on Windows 8 and later Ivan Zhakov <ivan at visualsvn dot com> Ivan Zhakov <ivan at visualsvn dot com> 2016-05-02 06:30:46 PDT
                 Re: Spell checking is very slow in commit dialog on Windows 8 and later steveking Stefan Küng 2016-05-02 11:02:06 PDT
Messages per page: