+ Reply to Thread
Results 1 to 5 of 5

Thread: Problems: sorting and slow performance

  1. #1
    javiaw is offline Registered User
    Join Date
    Jun 2008
    Posts
    7
    Downloads
    2
    Uploads
    0

    Default Problems: sorting and slow performance

    Hi,

    I've had some problems when an account has a huge amount of emails, I use IMAP server (courier) and RC 0.1.1 . I've been reading the forum looking for solutions and the changes I've applied work sometimes fine, but not perfectly:

    - First I set the DISABLE_THREAD_SORT as true in the imap configuration, because the sorting was being made by the server, and it took too long to read every message in a folder. It seemed to improve the RC load, but the server's load increased excessively (don't know why) and sometimes the sorting didn't work.

    - Maybe the problem was that RC didn't know that server wasn't sorting, so I removed the option SORT from the IMAP capabilities (setting DISABLE_THREAD_SORT as false to avoid overload). Then the load was really quick and server didn't overload, but as it happened before, sorting didn't work in some cases.

    - Then I remembered I had disabled the $rcmail_config['enable_caching'] option in config/main.inc.php. I thought enabling it again could solve the sorting problem, but I was wrong, the only that happens is that the cache table in the RC database is filled (as it's supposed to do)

    - In the accounts where the sort doesn't work, their files were migrated, so there was a change in the date and time information (of the files) and I guess that's the problem.

    Maybe sort functionality is not supported (or not in all cases), checking the alpha version I realized that is possible to sort by different fields but doesn't work properly. I wonder if the RC team is aware of these problems and if they are improving it.

    I hope this information will be useful.
    Thanks,
    Javi

  2. #2
    tjm74 is offline Roundcube Newcomer
    Join Date
    Aug 2008
    Posts
    10
    Downloads
    0
    Uploads
    0

    Smile hack-solution

    I can't turn off threadsort or stop advertising sort in my IMAP server since I have other IMAP clients that depend on this.

    Instead, I headed into program/lib/imap.inc
    on line 849 (or thereabouts, in function iil_C_Sort)

    and changed this line
    Code:
            $command  = 's ' . $is_uid . 'SORT (' . $field . ') ';
    to this:
    Code:
            if ($field == 'DATE' && !$add) {
                /* courier sends back headers sorted by date already - but if you ask it to sort by date it gets sloooow */
                $command  = 's ' . $is_uid;
            } else {
                $command  = 's ' . $is_uid . 'SORT (' . $field . ') ';
            }
    (new version 3/6/2009 restores filtering functionality in 0.2-stable)

    So now if the default sort-by-date is requested, the SORT command isn't passed to courier at all. Suddenly my RoundCube is blazing fast (unless I sort by something else, like size... but that I can live with).

    If any developers are reading this thread, it would be nice to add a config option for this.
    -tom
    Last edited by tjm74; 03-06-2009 at 07:15 PM. Reason: workaround to fix broken message list filtering in 0.2-stable

  3. #3
    javiaw is offline Registered User
    Join Date
    Jun 2008
    Posts
    7
    Downloads
    2
    Uploads
    0

    Default Good hack

    Nice hack tom it works pretty fine.
    I support your suggestion to add a configuration option.

  4. #4
    kuzb is offline Registered User
    Join Date
    Jun 2008
    Posts
    1
    Downloads
    1
    Uploads
    0

    Default Works well

    We too were having excessive speed problems - most noticeable for people with very large inboxes. Using this has sped up the initial load time of roundcube substantially.

    Our admins are currently looking in to the SORT command issue here to see if there is a better way to make the request to the IMAP server. Will post back if we find anything.

  5. #5
    tjm74 is offline Roundcube Newcomer
    Join Date
    Aug 2008
    Posts
    10
    Downloads
    0
    Uploads
    0

    Default switch to dovecot

    I have since switched to dovecot. I was fed up with slow search performance from courier.

    The transition was surprisingly painless. I strongly recommend it to anyone that is still using courier imap.

    To really take advantage of dovecot's auto-indexing, I am on the lookout for a good advanced search plugin for rc.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts