Incrementally filling up the view



Dave was teasing me that his E-mail client can show the first 25 headers
of a 50.000 messages sized mailbox at 1.38 seconds in his view.

So ... I couldn't let that teasing happen while not having that in
tinymail too. Duh! :-)

Although caused by the fact that he uses pipelining he can also allow
the user to already start working with the messages themselves, and that
this most likely wont be possible (unless I would start a new connection
to get the message while retrieval of the summary, in the background,
takes place) ... I did get incrementally filling up the view working in
the demo ui of tinymail. 

The only thing I had to change was to register my folder observer, the
tnyfoldermonitor, before doing the async refresh of the folder and
changing the "folder_changed" trigger of camel-lite to happen each 25th
header. It's that trigger that will be passed to the tnyfolder's
observable infrastructure.

I haven't measured the time it took to start showing headers, but it was
something like a second. Only the SELECT, the UID SEARCH and the first
UID FETCH for the 25 first message had to happen.

I need to clean all this up a little bit before I commit something like
this. It's really a hack for now :-)

All this will be part of the next phase: when I will start focusing on
the folderobserver stuff. I think the IMAP code, though not yet using
ENVELOPE, which is definitely something I want, is in a doable state
now. 

It will still need a lot improvements of course. Especially if I ever
want to beat Dave :), which is impossible, especially with Camel's
design, but that's okay

I'm expecting all this to start working between now and a month and demo
-ready around FOSDEM.

The good news is that Dave will be at FOSDEM. And I was hoping to be the
smartest IMAPper at FOSDEM this year. Damn :)

-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://www.pvanhoof.be/blog







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]