Review Request: Add a 10ms timer to scheduling a document for reparsing, and refactor -- fixes slowness when inserting text

Andreas Pakulat apaku at gmx.de
Wed Oct 31 07:55:51 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107140/#review21190
-----------------------------------------------------------


Can you explain a bit more why pasting big chunks is a problem in how the timer helps with that? The problem I'm seeing is that you're making some code asynchronous that was synchronous before, this can have nasty side-effects if there are unwritten assumptions about this elsewhere.

- Andreas Pakulat


On Oct. 30, 2012, 11:14 p.m., Sven Brauch wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107140/
> -----------------------------------------------------------
> 
> (Updated Oct. 30, 2012, 11:14 p.m.)
> 
> 
> Review request for KDevelop and Milian Wolff.
> 
> 
> Description
> -------
> 
>     Add a 10ms timer to scheduling a document for reparsing, and refactor.
>     
>     This fixes extreme slowness when pasting large parts of text
>     into the editor.
>     Also, make DocumentParsePlan targets a set instead of a list.
> 
> I wanted to write a unit test benchmark which verifies this but it turns out to be difficult, since you need a KateTextDocument for inserting text, and it's not being installed (the .h file). I thus didn't do that yet.
> 
> You can easily test this manually by pasting > 3000 lines into the editor.
> 
> 
> Diffs
> -----
> 
>   language/backgroundparser/backgroundparser.cpp 28a4202 
>   language/backgroundparser/documentchangetracker.h e3f7f5c 
>   language/backgroundparser/documentchangetracker.cpp 2aab705 
> 
> Diff: http://git.reviewboard.kde.org/r/107140/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sven Brauch
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121031/fd10e370/attachment.html>


More information about the KDevelop-devel mailing list