Slow highlighting on KDevelop start with many restored documents

David Nolden zwabel at googlemail.com
Wed Jan 19 20:47:26 UTC 2011


2011/1/19 Milian Wolff <mail at milianw.de>:
> David Nolden, 19.01.2011:
>> All open documents are parsed+highlighted fully. We don't
>> differentiate between the active one and other ones.
>>
>> What we could do is:
>> a) Changing the background-parser so that it processes the currently
>> active document first
>> or
>> b) Add the currently active document with a higher priority to the
>> background parser (maybe better)
>>
>> But we somehow need to track the currently active document then.
>
> Changing the priority of the active document shouldn't be too hard, or is it?
> This would be a big win I'd say. And thinking about it, don't we already favor
> opened documents over (non-opened)-project-documents? Can't we extend
> this/change this to active/visible-documents?
>
> I think I'll have to dig into the code to find answers to these questions.
>
> Bye, thanks for clarifiying.

Yes, open documents are preferred, by assigning them a higher
priority. It should be easy to increase the priority of the currently
active document, but then you've got to decrease it again when the
active document is changed. This shouldn't be hard though, since we
can use an arbitrary QObject* to mark our request (with high prio),
and then we can use it again to undo the request if the document has
been switched again.




More information about the KDevelop-devel mailing list