Re: [GSoC] Applying for conversion scripts to builtins
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 17, 2015, 18:38 UTC
- Message-ID
- <xmqqpp87o4eo.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <4355599932558291b22313f244eda9bd@www.dscho.org>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> Therefore, I would wager a bet that just the mere conversion of a > shell script into even a primitive `run_command()`-based builtin would > help performance on Windows in a noticeable manner.
As you correctly allege, if a patch rewrote a shell-scripted porcelain by using series of run_command() and doing nothing else, I would have asked "is that an improvement?", without knowing that.
> Of course, it would be *even nicer* to avoid the spawning altogether.
Yeah, that, too ;-)
Show 12 quoted lines
> The biggest benefit of avoiding needless parsing, however, is not > performance. It is avoiding quoting issues. This is particularly so on > Windows, where Git is sometimes called from outside a shell > environment, where we have to deal with inconsistent quoting because > it is every Windows program's own job to parse the command-line, > including the quoting. > > Concrete example: on Windows, we have file locking issues because > files that are in use cannot be deleted. For that reason, we have > Windows-specific code that is "nice" by trying harder to delete files, > giving programs a little time to let their locks go. This locking > issue happens also when a virus scanner "uses"...
These are definitely good advices from the area expert.
Thanks for a bunch of good input.