Re: [PATCH/RFC v3 0/4] Improving performance of git clean
- From
Jeff King <peff@peff.net>
- Date
- Apr 21, 2015, 21:24 UTC
- Message-ID
- <20150421212427.GB13230@peff.net>
- In-Reply-To
- <CAMpP7NaUv10Ox0gNsE8cg4hUnNNiFi8NZSLw6F6SW+SLrt0VwQ@mail.gmail.com>
On Tue, Apr 21, 2015 at 08:21:37PM +0200, erik elfström wrote:
Show 8 quoted lines
> Ok, thanks for looking into this. > > I have no well founded opinions on the implementation but I do > think the performance tests would be more meaningful if the > setup/cleanup code could be removed from the timed section. > If the community agrees on an implementation I would be happy > to convert the new tests, either directly in this series or as a follow > up if that is preferred.
If I understand correctly, the reason that you need per-run setup is that your "git clean" command actually cleans things, and you need to restore the original state for each time-trial. Can you instead use "git clean -n" to do a dry-run? I think what you are timing is really the "figure out what to clean" step, and not the cleaning itself.
-Peff