D17441: tune editing actions for large number of small edits

Anthony Fieroni noreply at phabricator.kde.org
Sun Dec 9 07:14:41 GMT 2018


anthonyfieroni added inline comments.

INLINE COMMENTS

> katetextblock.cpp:153
>      // remember all ranges modified
> -    QSet<TextRange *> changedRanges;
> +    std::vector<TextRange *> changedRanges;
>      foreach (TextCursor *cursor, m_cursors) {

You can use unordered_set, so you don't need m_isCheckValidityRequired any more. It can be applied to other places as well.

> katesearchbar.cpp:815
> +    const int maxHighlightings = 65536;
> +    std::vector<Range> highlightRanges;
> +

You can preserve say 1024 i think.

> katesearchbar.cpp:852
>              } else {
> -                // Highlight and continue after original match
> -                //highlightMatch(match);
> -                highlightRanges << match.range();
> -                matchCounter++;
> +                highlightRanges.clear();
>              }

Why you clear highlights, you can break and continue with stored ones no?

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D17441

To: cullmann, dhaumann, #kate, loh.tar
Cc: anthonyfieroni, kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20181209/1813c2c2/attachment-0001.html>


More information about the KWrite-Devel mailing list