A.L.E.C wrote:
> Next version with small fix. Please, someone check the patch with
> enabled caching. In my opinion, it can be commited to trunk now.
> 
Well, I'm still not convinced about the bodystructure stuff in headers.
Especially if you have caching disabled, all headers need to be fetched
when listing a folder. This IMO is too much overhead just to safe one FETCH
command in the case one opens a message.

You made the bodystructure fetch optional in iil_C_FetchHeader() so why not
 add a thirg argument to rcube_imap::get_headers() which defaults to false
(for listing) but will be used in rcube_message class.

Let's check this for caching enabled and disabled:

Caching disabled:
 - headers are fetched for listing in one FETCH command
 - headers + bodystructure are fetched together when viewing the message
 - part headers are fetched in an additional FETCH command
 -> list + view totals in 3 FETCH commands

(even if we always fetch the bodystructure there won't be less fetch
commands because caching is disabled)

Caching enabled:
 - headers are fetched for listing in one FETCH command
 - headers are cached, bodystructure needs to be fetched when viewing msg.
 - part headers are fetched in an additional FETCH command
 -> list + view totals in 3 FETCH commands (of not cached yet)

(once the bodystructure is fetched it is also saved in cache)

My conclusion: making the bodystructure optional in
rcube_imap::get_headers() and use it in rcube_message::__construct() would
be a reasonable improvement.

~Thomas
_______________________________________________
List info: http://lists.roundcube.net/dev/

Reply via email to