Skip to content
Commit 16819f28 authored by Nikita Sirgienko's avatar Nikita Sirgienko Committed by Alexander Semke
Browse files

Fix bad performance for `addRules` in `DefaultHighlighter` for big containers

Summary: Now, in `addRules` we call `addRule`, which emit `rulesChanged`, that leads to `rehighlight` all worksheet. This is useless work, because for each rule in rules container we reprocessing all worksheet. (instead better option to emit `rulesChanged` only one time after container processing). So, when container is big, performance falls quite strongly, for example highlighter of octave backend spends 2-4 seconds for adding new function. So this changes improve `emit` logic, calling only one event for rules container.

Test Plan:
1) Start octave backend, write octave function, check, that cantor is freezed for few seconds
2) Apply patch
3) Check, that octave backend don't freeze after entry with user function.

Reviewers: #cantor, asemke

Subscribers: #cantor, #kde_edu

Tags: #kde_edu, #cantor

Differential Revision: https://phabricator.kde.org/D11992
parent 0b384f36
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment