Please find responses inline below. Thank you. :-)


> 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). 
>


How? I know that imaplib allows selection of mailbox folders using
*mail.select("mailbox")*

But how does one do that directly in the model while using DAL?



 

> > 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). 
>


For a beginner, like me, the adapter is adequately confusing. But in time, 
I might be able to decode and document that in a schematic diagram.
Does or does not every http request cost a lot more time and bandwidth in 
and by itself? 



 

> > 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).
>


So, you strongly recommend using another DB? But would that not be 
redundant as all the information will already be on the server, and any 
deletion or copy-move on the server affect the integrity of the data stored 
in the external DB?

I thought I was the only person to get mangled message contents while using 
imaplib on gmail servers. Relieved to know that I am not alone.
But what might be causing that problem?



 

> > 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).
>


Will it be faster to fetch a single Email's content with UID using DAL? Or 
rather which of the following is faster:
 — Query using imaplib = returns a list of UID + Fetch each email content 
using DAL
 — Query using DAL + Fetch email content using DAL



 

> > 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.
>

 

Tried it briefly. Not tried it fully yet. If you do, can you add some of 
its features to the DAL adapter? It will be easier to have more features on 
the DAL itself than to find and learn more python libraries.


 


*— PRACHI V*







-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to