[PATCH 4/4] Large clone chewing CPU

Bryan O'Sullivan bos at serpentine.com
Sun Sep 4 02:08:49 CDT 2005


On Sat, 2005-09-03 at 23:50 -0700, Eric M. Hopper wrote:
> Taking my changes to 0.6c to improve performance, and merging them in
> with the tip of the main repository.

On first glance, this looks good, but there are a few small things I'd
like you to do before I look at this more.  Some of these are general
good guidelines for contributing patches, some are specific to the set
you sent.

Please base patches off a recent revision, not the last release.  This
makes accepting them more straightforward.

Also, since 4 seems to dup 1, 2, and 3, I can't tell which of the four
patches really needs to be reviewed.  Please send one patch where one
patch makes sense.

Use the contrib/patchbomb script, or something similar, to send patches
inline, instead of as attachments.  Some email clients, mine included,
won't let people quote attachments, so reviewing becomes a chore.

Doc comments shouldn't flush to column 0.  Please keep them at the same
indent level as the block of code they're documenting.

+            reduce(lambda wrt, ch: (wrt(ch) and None) or wrt,
+                   self.in_iter, collector.write)

Don't abuse reduce like this; reading at midnight, I've no idea what
it's trying to do.  Use a for loop.

This doesn't need the first set of parens:

        if (l > len(self.buf)) and not self.iterempty

Thanks for keeping at this,

	<b



More information about the Mercurial mailing list