Hi all, ive seen several requests on the mailinglist and forums
concerning sorting by internaldate. Looking through the code there
seems to be pieces of code to facilitate this, but either I cant find
the way to actually set this, or it's not finished. For many imap
servers a SORT (ARRIVE) is orders of magnitude faster as all you need
to do is stat() the files. For SORT (DATE) you need to open every
single email (which can be tens of thousands), find the Date header,
then sort all of them. And all so you can find the 50 messages
roundcube wants to show.
I have a lot of experience with the customer side of this setting as
we have this set in our current webmail solution (squirrelmail). In
practice there is a percentage of customers that dont like sorting by
arrival date. They just dont understand why an email with an obvious
date thats older is sorted above an other email. So we have this
configurable, with a default of arrival date. That way you can
accommodate people that dont like this, while at the same time benefit
from the bulk of people that dont care.
It should be trivial to add a user-configurable option in roundcube to
allow sorting by arrival date. Id be more than happy to make a patch.
Would this be something of use to RC?
Cor _______________________________________________ List info: http://lists.roundcube.net/dev/
Cor Bosman wrote:
Hi all, ive seen several requests on the mailinglist and forums
concerning sorting by internaldate. Looking through the code there
seems to be pieces of code to facilitate this, but either I cant find
the way to actually set this, or it's not finished. For many imap
servers a SORT (ARRIVE) is orders of magnitude faster as all you need
to do is stat() the files. For SORT (DATE) you need to open every
single email (which can be tens of thousands), find the Date header,
then sort all of them. And all so you can find the 50 messages
roundcube wants to show.
On my server (dovecot 1.1) the ARRIVE sorting is 80% faster, but for folder with 7k messages it's only 0.01 sec.
It should be trivial to add a user-configurable option in roundcube to
allow sorting by arrival date. Id be more than happy to make a patch.
Would this be something of use to RC?
Not so trivial, for database caching you must add column for internal date (and handle it). Or maybe use message ID would be sufficient? Other thing is a lack of internal date column on messages list, so changing sorting order could be confusing. But.... it's possible, so if you like, create a patch, we'll see.
On my server (dovecot 1.1) the ARRIVE sorting is 80% faster, but for folder with 7k messages it's only 0.01 sec.
Do you use dovecot's deliver? I asked Timo how dovecot handles ARRIVE
and DATE sorting when creating indexes. In some situations you may
have unindexed folders (for instance, when not using deliver), and im
wondering how the difference is then. You could test this by removing
all indexes for the 7k folder you have and issuing both commands.
It should be trivial to add a user-configurable option in roundcube
to allow sorting by arrival date. Id be more than happy to make a patch. Would this be something of use to RC?Not so trivial, for database caching you must add column for
internal date (and handle it). Or maybe use message ID would be sufficient? Other thing is a lack of internal date column on messages list, so changing sorting order could be confusing. But.... it's possible, so
if you like, create a patch, we'll see.
Ah, I didnt think about database caching. That makes things quite a
bit more complicated.
Im not sure an internal date column is necessary. Most of the time
emails will appear sorted correctly when just displaying the Date:
header as you would now. Once in a while you'd get apparently out-of-
order emails (especially spam, but also emails that get delayed on the
way), but I think the user-configurable setting explains most of that.
We do this currently with squirrelmail and i rarely, if ever, get
questions about the sorting display. Squirrelmail does not display the
internaldate in the date column afaik. You think it's necessary to
display the internaldate?
Cor
List info: http://lists.roundcube.net/dev/
Cor Bosman wrote:
Do you use dovecot's deliver? I asked Timo how dovecot handles ARRIVE and DATE sorting when creating indexes. In some situations you may have unindexed folders (for instance, when not using deliver), and im wondering how the difference is then. You could test this by removing all indexes for the 7k folder you have and issuing both commands.
OK, now it's 6 sec. but I was do this first time ever. So, this will not happen very often.
Im not sure an internal date column is necessary. Most of the time emails will appear sorted correctly when just displaying the Date: header as you would now. Once in a while you'd get apparently out-of-order emails (especially spam, but also emails that get delayed on the way), but I think the user-configurable setting explains most of that. We do this currently with squirrelmail and i rarely, if ever, get questions about the sorting display. Squirrelmail does not display the internaldate in the date column afaik. You think it's necessary to display the internaldate?
No, it's not necessary, and would be better to not display it, but it will be a little bit inconsistent. User is able to change sorting by clicking on column header. It's not possible with not-existent column ;) We should implement 3-state sorting switch then, asc, desc, no-sorting, and "no-sorting" means "by internaldate".
On Wed, 24 Jun 2009 15:06:15 +0200, "A.L.E.C" alec@alec.pl wrote:
No, it's not necessary, and would be better to not display it, but it will be a little bit inconsistent. User is able to change sorting by clicking on column header. It's not possible with not-existent column
;)
We should implement 3-state sorting switch then, asc, desc, no-sorting,
and
"no-sorting" means "by internaldate".
My message threading patch (http://www.atomice.com/blog/?page_id=34) implements this. It adds a dummy search column called 'default'. Clicking on the Date column toggles between ascending, descending and 'default'.
Like Aleksander, I found Dovecot's sorting could take several seconds with a very large mailbox (~30,000 messages).
Regards, Chris
List info: http://lists.roundcube.net/dev/