[dev] [cvs] commit: imp/lib Mailbox.php imp/lib/IMAP Cache.php

Jan Schneider jan at horde.org
Fri Apr 28 00:57:57 PDT 2006


Zitat von Michael M Slusarz <slusarz at horde.org>:

> Quoting Michael M Slusarz <slusarz at horde.org>:
>
>> slusarz     2006-04-27 21:51:52 PDT
>>
>>  Modified files:
>>    lib                  Mailbox.php
>>    lib/IMAP             Cache.php
>>  Log:
>>  These changes seems to make caching work much, much better.
>>  Search results seem to be working again.
>>  We now cache thread objects.
>>  We should only rebuild the mailbox list now in the following situations:
>>  + first access to mailbox
>>  + if mailbox has changed (per imap_status() call)
>>  + in message view, only when we reach the last message in list.
>>  + for search mailboxes, every mailbox access
>>  What are we gaining?  In cases 2 and 3 above, we used to always generate
>>  the mailbox list - now we only regenerate if needed.
>>  In case 1 above, we used to regenerate every time we switched     
>> mailboxes.  now
>>  we only regenerate when switching mailboxes if the mailbox has changed.
>
> Thoughts on caching and search mailboxes:
> What about entirely caching search results - i.e. a search will result
> in a "snapshot" of message results.  Even if a user does something to
> the results (i.e. delete, change flags) that would normally cause the
> message to disappear from the search results, it will remain.  We
> could then provide a link in the header banner that would allow us to
> "Re-perform search".  Caching search results in this way would be
> *very* useful when doing large searches (i.e. a search on all
> mailboxes).  Personally, I wouldn't mind having this results be
> persistent in exchange for most improved performance - additionally,
> the idea that the search provides a "snapshot" of results is
> consistent with the way other search engines work (i.e. google doesn't
> update results after a page is loaded; windows search does not add
> newly created items to the results list after you have completed
> searching).
>
> Virtual folders would be a separate story.  We would continue to
> re-run the search on every page access - since I expect virtual
> folders to show up-to-date results.  Unfortunately, I can't think of a
> way to reliably provide these results without having to do an IMAP
> search on every mailbox page load in a virtual folder, so we will not
> gain any benefits of caching in virtual folders.  This may just have
> to be the performance price we pay for this feature.  In any case,
> performance is equal to before so we aren't losing anything.

Hm, in which situations would you reload a search pages with the same  
criteria if you already take the virtual folders out of the equation?  
I can't think of one, and generally this should be so rare that it  
isn't worth the effort to cache any search results.
If I search for message, then either to find and read a particular  
message, and I don't return to the search results after that, or to  
manage the messages in the search results, and in this case I want  
immediate feedback if I change anything (delete, mark, move).

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list