[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: KDE/kdelibs/kate/view
From: Dominik Haumann <dhdev () gmx ! de>
Date: 2010-12-14 23:17:00
Message-ID: 201012150017.01217.dhdev () gmx ! de
[Download RAW message or body]
On Tuesday, 14. December 2010, Milian Wolff wrote:
> Pascal Létourneau, 14.12.2010:
> > SVN commit 1206542 by pletourn:
> >
> > Optimization:
> > Clear selection range (it's moving range) before removing text
> >
> > BUG:259879
> >
> > M +4 -1 kateview.cpp
> >
> > --- trunk/KDE/kdelibs/kate/view/kateview.cpp #1206541:1206542
> > @@ -1783,11 +1783,14 @@
> >
> > m_doc->editStart ();
> >
> > - m_doc->removeText (m_selection, blockSelect);
> > + // Optimization: clear selection before removing text
> > + KTextEditor::Range selection = m_selection;
> >
> > // don't redraw the cleared selection - that's done in editEnd().
> > clearSelection(false);
> >
> > + m_doc->removeText(selection, blockSelect);
> > +
> >
> > m_doc->editEnd ();
> >
> > return true;
>
> This would probably also be "fixed" by making the revision history
> slimmer for this case, i.e. don't store one item per removed line but
> just one item that removes all in one go.
And maybe this should even be covered by a unit test? If the performance
penalty is that big, it's probably just a matter of time until someone comes
and changes the code accidently again. On the other hand, we'll never have
unit tests for everything, so maybe this is just a wrong idea ;)
greetings
dominik
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic