On Wed, 21 Sep 2016 13:26:31 -0700, Durham Goode wrote:
d> On 9/21/16 1:07 PM, Arun Kulshreshtha wrote:
> > On 9/21/16, 7:34 AM, "Yuya Nishihara" <y...@tcha.org> wrote:
> > > Additionally, we’d need to wrap other callsites of
> > > _runcommand(), such as _checkshellalias(), to maintain the existing
> > behavior.
> > Good point. Given that we want to start profiling as early as
> > possible, I think
> > it's better to test profiling.enabled before extensions.loadall(lui),
> > and test
> > it again after parsing command options.
> > CC’ing Durham on this. I considered doing this, but during our (offline)
> > discussion about this, it seemed
> > like it was undesirable to profile uisetup() for each extension, which is
> > why I placed maybeprofile() after
> > extensions.loadall(). However, if we do indeed want to start profiling as
> > early as possible, then I’ll try enabling
> > profiling as early as possible in _dispatch() and remove the other
> > callsites.
> The only reason I hesitated to wrap uisetup and extsetup is that
> extensions may modify the profile logic (like we have a statprofext
> extension that configures statprof), so wrapping early may make that
Yeah, that's a valid point. It makes some sense to start profiling after
Maybe --debugger has the same chicken-and-egg issue.
Mercurial-devel mailing list