[Bug 279149] New: Slow mark as read and folder loading

András Manţia amantia at kde.org
Tue Aug 2 11:30:34 BST 2011


https://bugs.kde.org/show_bug.cgi?id=279149

           Summary: Slow mark as read and folder loading
           Product: Akonadi
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: Maildir Resource
        AssignedTo: kdepim-bugs at kde.org
        ReportedBy: amantia at kde.org


I added a new maildir resource and set it to my Mail folder. This resulted in
all mails appearing as unread. Now if I click on a folder with many mails (3000
to 30000), it takes even minutes to load. This is somewhat expected as KMail's
message list is slow as well. The problem appears when I try to mark them as
read (right click on a folder, Mark all Mails as Read). This is also slow, and
after the messages are marked as read, the resources starts to fetch again all
the mails.
I get lots of
akonadi_maildir_resource_0 (0x884c90) 70850 UID FETCH 226252 FULLPAYLOAD
CACHEONLY ANCESTORS INF EXTERNALPAYLOAD (UID REMOTEID REMOTEREVISION
COLLECTIONID FLAGS SIZE)  

fetches (with the UID increasing).

If I attach the debugger to the resource, it shows it is busy inside
MaildirResource::itemChanged. The changed part is the FLAGS part, that should
be because of the Mark as Read. The code goes through this part then:
if ( mSettings->readOnly() || !payloadChanged ) {
      changeProcessed(); <---- here
      return;
    }

Now if you do the right click on a folder->Mark all Mails as Read for a few
folders one after the other, you will see the busy indicator near the folders.
The messages will be eventually marked as read, but the busy indicator remains
due to the above fetches.
Curiously I let the machine running over night and it was still busy in the
morning, with heavy disk activity from the maildir resource. The
agent_config_akonadi_maildir_resource_0_changes.dat grew also big, it was 13MB. 

Furthermore even after I restarted the akonadi server and cleaned up the
changes.dat file, the first access to a folder is very slow and the business is
in the resource, not kmail. Further accesses are somewhat faster, even if I
restart kmail.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list