[Bug 55634] TplLogStore implementation for logs retrieved from GMail
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Oct 5 13:00:44 CEST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=55634
--- Comment #1 from Will Thompson <will.thompson at collabora.co.uk> ---
(In reply to comment #0)
> The branch is still not quite finished: it doesn't implement
> _tpl_log_store_search_new(), or the new walker API.
It now does implement search_new (but still not the walker API).
I think I'm done with this for a little while.
An interesting refactoring might be to split TplLogStoreGtalkMimeReader in two:
one part which turns a GMimeMessage into a GInputStream for its text/xml part,
and another one which feeds GInputStreams through the TplLogStoreGtalkReader
(the WockyXmppReader subclass for <conversation xmlns=google:conversation>
blobs).
This might make it easier to test code in isolation, rather than having to
bundle everything up in mbox files, and would make the code better prepared to
accept messages via some other path or email library. Given a GInputStream for
a conversation, there could be a _pop() method which does:
while ((stanza = wocky_xmpp_reader_pop_stanza()) == NULL)
{
read some input;
if there's no more input, break;
else, feed it to the reader;
}
which would reduce unnecessary parsing of entire conversations (for instance,
right now figuring out MUC JIDs involves parsing the entire <conversation>,
then just looking at the first <message> within it). I haven't profiled this
stuff on actual full-size logs so I don't know if it's necessary. I imagine
it's really slow, but…
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list