From 86c9aafb56e8e555871d5fe713aa33d65cf08fc4 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 1 Apr 2002 23:58:53 +0000 Subject: Temporarily disable indexing. 2002-04-02 Not Zed * providers/local/camel-local-folder.c (camel_local_folder_construct): Temporarily disable indexing. 2002-03-28 Not Zed * camel-partition-table.c (camel_key_table_lookup): Change range checking assert to a warning. * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we flush out all outstanding commands before finalising, stops being finalised while outsanding requests are processed by the store finalise. (pop3_get_message): Instead of pre-fetching all messages, just pre-fetch a maxiumum number at any one time, stops us running out of cache fd's. * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise): Setup priv data + locks, & free. * providers/imap/camel-imap-folder.c (imap_rescan): Batch all message_chagned events into a single folder_changed event (otherwise updates can be >>> expensive, like >5 hours for 80K messages changing!). Alternately it could use folder freeze/unfreeze perhaps. 2002-03-27 Not Zed * providers/imap/camel-imap-store.c (imap_keepalive): Pass an exception to called code so it behaves properly since it uses the passed exception to check returns. svn path=/trunk/; revision=16319 --- camel/providers/pop3/camel-pop3-folder.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'camel/providers/pop3') diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c index 777f81fe9b..27fa98cfa1 100644 --- a/camel/providers/pop3/camel-pop3-folder.c +++ b/camel/providers/pop3/camel-pop3-folder.c @@ -99,9 +99,16 @@ pop3_finalize (CamelObject *object) { CamelPOP3Folder *pop3_folder = CAMEL_POP3_FOLDER (object); CamelPOP3FolderInfo **fi = (CamelPOP3FolderInfo **)pop3_folder->uids->pdata; + CamelPOP3Store *pop3_store = (CamelPOP3Store *)((CamelFolder *)pop3_folder)->parent_store; int i; for (i=0;iuids->len;i++,fi++) { + if (fi[0]->cmd) { + while (camel_pop3_engine_iterate(pop3_store->engine, fi[0]->cmd) > 0) + ; + camel_pop3_engine_command_free(pop3_store->engine, fi[0]->cmd); + } + g_free(fi[0]->uid); g_free(fi[0]); } @@ -402,7 +409,7 @@ pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex) CamelPOP3Command *pcr; CamelPOP3FolderInfo *fi; char buffer[1]; - int ok, i; + int ok, i, last; CamelStream *stream = NULL; fi = uid_to_fi(pop3_folder, uid); @@ -458,10 +465,13 @@ pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex) fi->err = EIO; pcr = camel_pop3_engine_command_new(pop3_store->engine, CAMEL_POP3_COMMAND_MULTI, cmd_tocache, fi, "RETR %u\r\n", fi->id); - /* Also initiate retrieval of all following messages, assume we'll be receiving them */ + /* Also initiate retrieval of some of the following messages, assume we'll be receiving them */ if (pop3_store->cache != NULL) { + /* This should keep track of the last one retrieved, also how many are still + oustanding incase of random access on large folders */ i = fi_to_index(pop3_folder, fi)+1; - for (;iuids->len;i++) { + last = MIN(i+10, pop3_folder->uids->len); + for (;iuids->pdata[i]; if (pfi->uid && pfi->cmd == NULL) { -- cgit v1.2.3