> For every query and search, does the DAL adapter do all these steps? > Read email box lists + Then Search for messages matching query + Separate > Fetch for > each message
Well, actually, I think the mailbox list can be set in the model (so it supposedly saves the list retrieval request). > Do you have a schematic diagram of all the processes, transactions, read mail > box > requests + responses, search requests + responses, mail fetch, etc.? If yes, > does not > every http request cost a lot more time and bandwidth in and by itself? I'm afraid I don't, so far. However, the code in IMAPAdapter is pretty straight forward. I suppose you can make any research you need of the workflow in the code itself (and ideally post it somewhere so it gets documented). > How can it be made faster with only using IMAP server, and not deploying any > local > secondary backend DB? Allow me to insist in a sqlite/wathever mails db for fast queries. We could make the mail retrieval faster by requesting bulk messages. The problem is that AFAIK imaplib mangles multiple message responses (at least with gmail). > Will it be faster if I use the python imaplib to First Search the UIDs of > emails, and then: > use the DAL adapter to fetch the contents or headers of the respective UIDs? Why not. For that particular case (i.e. requesting only the ids/uids for a given query), we could make the .select() a lot faster since it requires a single command (it does not need to retrieve any message part). > http://imapclient.readthedocs.org/en/latest/ I didn't know about it. Have you tried it? It could be a good alternative for retrieving multiple messages. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

