[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    [Bug 87857] Selecting an email and pressing delete is unnessarily
From:       Marek Janukowicz <marek () janukowicz ! net>
Date:       2006-03-30 20:20:50
Message-ID: 20060330202050.4696.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=87857         




------- Additional Comments From marek janukowicz net  2006-03-30 22:20 -------
Created an attachment (id=15382)
 --> (http://bugs.kde.org/attachment.cgi?id=15382&action=view)
Patch fixing slow delete problem

I dug through the code and narrowed the problem to KMHeaders::prepareMove
method. When all messages from a folder were to be deleted, it scanned ALL
messages in the folder for EACH message deleted (O(n^2) complexity) just to set
the selection after delete job completed. 

I changed this to only scan next and previous message. In my opinion it should
be enough, as if next/previous message is selected too, it will also be deleted
(which in turn will fire prepareMove method again, selecting another
next/previous message).

I'm sure I didn't make myself clear enough, but if anyone acquainted with kmail
code reviews it, he should understand the idea.

It is my first patch against KDE (besides some work in KDevelop a long time
ago), so any comments are welcome.

The patch was made against /branches/KDE/3.5/kdepim from yesterday.
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic