[Evolution-hackers] sync vs async in invokations of sa-learn

Not Zed notzed@ximian.com
Wed, 11 Aug 2004 10:17:27 +0800


--=-gfELyDBI4Dhp5oV1o1BR
Content-Type: multipart/alternative; boundary="=-PeMs82l1L0DbxAo8hr5v"


--=-PeMs82l1L0DbxAo8hr5v
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Tue, 2004-08-10 at 18:17 +1000, Andrew Cowie wrote:

> I know that you hold up updates to the UI when processing and learning
> junk, and understand why.*
> 
> However, it's obvious in evolution/mail/em-junk-filter.c that someone
> took enormous effort to separate the act of injecting messages vi sa-
> learn from having sa-learn rebuild it's databases. (ie, use of --no-
> rebuild when learning, and then later a call to sa-learn with --
> rebuild).
> 
> It would seem that the later action [em_junk_sa_commit_reports()] could
> happen in the background asynchronously. There's no need for the UI to
> wait for that as well, is there?

Well there are definitely possibilities for improvement in the code.  We
also wanted to batch up processing, although i can't remember if we
managed to do that either.  Infact all of the sa-learn and commit-
reports could be sub-threaded since it is only the setting of the flags
and the like which is important to the ui, which only requires the test.

-- 

Michael Zucchi <notzed@ximian.com>
"born to die, live to work, it's all
downhill from here"
Novell's Evolution and Free Software
Developer

--=-PeMs82l1L0DbxAo8hr5v
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.1.19">
</HEAD>
<BODY>
On Tue, 2004-08-10 at 18:17 +1000, Andrew Cowie wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">I know that you hold up updates to the UI when processing and learning</FONT>
<FONT COLOR="#000000">junk, and understand why.*</FONT>

<FONT COLOR="#000000">However, it's obvious in evolution/mail/em-junk-filter.c that someone</FONT>
<FONT COLOR="#000000">took enormous effort to separate the act of injecting messages vi sa-</FONT>
<FONT COLOR="#000000">learn from having sa-learn rebuild it's databases. (ie, use of --no-</FONT>
<FONT COLOR="#000000">rebuild when learning, and then later a call to sa-learn with --</FONT>
<FONT COLOR="#000000">rebuild).</FONT>

<FONT COLOR="#000000">It would seem that the later action [em_junk_sa_commit_reports()] could</FONT>
<FONT COLOR="#000000">happen in the background asynchronously. There's no need for the UI to</FONT>
<FONT COLOR="#000000">wait for that as well, is there?</FONT>
</PRE>
</BLOCKQUOTE>
Well there are definitely possibilities for improvement in the code.&nbsp; We also wanted to batch up processing, although i can't remember if we managed to do that either.&nbsp; Infact all of the sa-learn and commit-reports could be sub-threaded since it is only the setting of the flags and the like which is important to the ui, which only requires the test.
<PRE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
<TABLE CELLSPACING="6">
<TR>
<TD>
<IMG SRC="cid:1092190387.4553.28.camel@lostzed.mmc.com.au" WIDTH="48" HEIGHT="48" ALIGN="top" ALT="" BORDER="0">
</TD>
<TD>
<B>Michael Zucchi</B> &lt;<A HREF="mailto:notzed@ximian.com">notzed@ximian.com</A>&gt;<BR>
<I>&quot;born to die, live to work, it's all downhill from here&quot;</I><BR>
<TT>Novell's <A HREF="http://codeblogs.ximian.com/blogs/evolution/">Evolution</A> and <A HREF="http://www.gnu.org/philosophy/free-sw.html">Free Software</A> Developer</TT>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</PRE>
</BODY>
</HTML>

--=-PeMs82l1L0DbxAo8hr5v--

--=-gfELyDBI4Dhp5oV1o1BR
Content-ID: <1092190387.4553.28.camel@lostzed.mmc.com.au>
Content-Disposition: attachment; filename=zed-48.small.jpg
Content-Type: application/octet-stream; name=zed-48.small.jpg
Content-Transfer-Encoding: base64

/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p
LSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDA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