On Fri, Oct 12, 2012 at 10:09:48PM -0400, Dave Abrahams wrote:
> on Fri Oct 12 2012, Dave Abrahams <dave-AT-boostpro.com> wrote:
> > I'm currently working on my initial sync, so I don't know how it will
> > behave once that's done, but when I restart mbsync it still spends
> > several minutes just looking at the list of messages and deciding what
> > to do.
> >
that's because in default mode it tries a full sync. there is no way
around querying the current state of both sides to find differences to
propagate.

> > Just a thought for Oswald about where to look: I have not analyzed the
> > code in detail, but the structure of some of the "for" loops suggests
> > there may be an O(N^2) algorithm or two in there (e.g. in match_tuids)?
> 
in master i'm using a hash table for the part which actually was eating
cpu. there is still a path with worst-case O(n^2) behavior, but you'd
have to work hard to actually trigger it (you shouldn't be able to get
there with natural use).
irrespective of that, it's somewhat unlikely that cpu use is the actual
problem (watch 'top' while it is "hanging").

> Actually, once the initial sync is done, with 
> 
>  Sync New
> 
> in my ~/.mbsyncrc, it is impressively fast!
> 
this doesn't propagate flag changes back to the server. it's a perfectly
reasonable choice if you use the imap mailbox like a pop mailbox, but
not otherwise.

if somebody is interested in maintaining huge local mailboxes and still
wants to properly sync, i'd have to come up with something. for example,
it would be possible to have a "soft" MaxMessages: while all messages
actually stay on the client side, only the last n messages are actively
monitored for changes. the thing is that it's not visible in the MUA
where n ends, so it may be rather confusing.

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to