[PATCH 05 of 10] wireproto: don't format a debug string inside a hot loop

Bryan O'Sullivan bos at serpentine.com
Thu Sep 13 18:16:32 CDT 2012

On Thu, Sep 13, 2012 at 3:30 PM, Mads Kiilerich <mads at kiilerich.com> wrote:

> This pattern could probably be useful in a lot of places ... except that
> we don't want to check the  debugflag everywhere.

This is only worth caring about in a handful of situations where we can see
that ui.debug is causing a problem, such as this one. In such cases, I'm
fine with checking debugflag by hand; doing so is cheaper than a function
call that does the same thing, too.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120913/93ebcb10/attachment.html>

More information about the Mercurial-devel mailing list