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:
- Start octave backend, write octave function, check, that cantor is freezed for few seconds
- Apply patch
- Check, that octave backend don't freeze after entry with user function.
Reviewers: Cantor, asemke
Differential Revision: https://phabricator.kde.org/D11992