D17441: tune editing actions for large number of small edits
noreply at phabricator.kde.org
Sun Dec 9 11:59:07 GMT 2018
cullmann added a comment.
Will improve further ;=)
> anthonyfieroni wrote in katetextblock.cpp:153
> You can use unordered_set, so you don't need m_isCheckValidityRequired any more. It can be applied to other places as well.
Actually no, that will be again a lot more expensive.
With the vector, you get one allocation in many cases, with unordered_set a lot, like with QSet.
But I tend to move that to QVarLengthArray to avoid allocations at all for the normal case of << 32 cursors.
> dhaumann wrote in katetextrange.h:364
> I would prefer an additional
> inline void setValidityCheckRequired();
> inline bool validityCheckRequired() const;
> We don't need a bool in the setter, since we always only mark dirty. And with these accessors, you could add a unit test (in dact, I would like to see one for this).
> And instead of 'double' I suggest to use the term 'multiple' in the comment.
That makes sense, will change that.
Looks nicer in the code, too.
> dhaumann wrote in katesearchbar.cpp:815
> If it's not an issue at all, I prefer to have limits that are realistic. If it scales well for, say 4096, then 4096 is the better choice.
Actually, on a decent machine, 64k things work.
The issue with corner cases like this test is >> 1 million ranges.
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...
More information about the KWrite-Devel