Bug 259879

Summary: Very slow deleting for many lines of short text
Product: [Applications] kate Reporter: Todd <toddrme2178>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Todd 2010-12-14 19:46:30 UTC
Version:           SVN (using KDE 4.5.85) 
OS:                Linux

Kate is extremely slow at deleting many (on the order of hundreds of thousands) of short lines of text.  Adding the text is fast, but removing it is very slow.

Reproducible: Always

Steps to Reproduce:
1. Make a short line of text, say "test"
2. Copy the line and paste it in a new line
3. Select everything
4. Copy
5. Paste in a new line
6. Repeat 3-5 until you have over 500,000 lines of text (this should be under 20 times, since the number of lines doubles each iteration)

You can use any other process that gets numbers of lines of this order of magnitude.

Actual Results:  
It takes many minutes to delete

Expected Results:  
It should delete in a few seconds.

This also happens with cutting.  Try cutting the text, it takes minutes.  Then paste it, it takes seconds.
Comment 1 Pascal Létourneau 2010-12-14 22:47:54 UTC
SVN commit 1206542 by pletourn:

Optimization:
Clear selection range (it's moving range) before removing text

BUG:259879


 M  +4 -1      kateview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1206542