[PATCH 7 of 7 V2] fncache: clean up fncache during strips
Matt Mackall
mpm at selenic.com
Tue Apr 1 23:50:44 UTC 2014
On Mon, 2014-03-31 at 18:39 -0700, Pierre-Yves David wrote:
>
> On 03/31/2014 04:19 PM, Durham Goode wrote:
> > + def remove(self, fn):
> > + if self.entries is None:
> > + self._load()
> > + if fn in self.entries:
> > + self._dirty = True
> > + self.entries.remove(fn)
>
> You can same the double lookup by using exception catching.
>
> Not sure if this is faster.
It's not. It's actually faster to do a name lookup than to set up an
exception frame.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list