Re: [PATCH v2 3/4] Speed up is_git_command() by checking early for internal commands

2014-01-22 Thread Sebastian Schuberth
On 05.01.2014 14:42, Sebastian Schuberth wrote: Since 2dce956 is_git_command() is a bit slow as it does file I/O in the call to list_commands_in_dir(). Avoid the file I/O by adding an early check for internal commands. Considering the purpose of the series is it better to say builtin instead

Re: [PATCH v2 3/4] Speed up is_git_command() by checking early for internal commands

2014-01-03 Thread Jeff King
On Thu, Jan 02, 2014 at 11:41:05AM -0800, Junio C Hamano wrote: - builtin/merge.c is the same, but it is conceptually even worse. It has the end-user supplied string and wants to see if it is a valid strategy. If the user wants to use a custom strategy, a single stat() to make sure

Re: [PATCH v2 3/4] Speed up is_git_command() by checking early for internal commands

2014-01-03 Thread Kent R. Spillner
Since 2dce956 is_git_command() is a bit slow as it does file I/O in the call to list_commands_in_dir(). Avoid the file I/O by adding an early check for internal commands. Considering the purpose of the series is it better to say builtin instead of internal in the commit message?-- To

Re: [PATCH v2 3/4] Speed up is_git_command() by checking early for internal commands

2014-01-03 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Thu, Jan 02, 2014 at 11:41:05AM -0800, Junio C Hamano wrote: - builtin/merge.c is the same, but it is conceptually even worse. It has the end-user supplied string and wants to see if it is a valid strategy. If the user wants to use a custom

Re: [PATCH v2 3/4] Speed up is_git_command() by checking early for internal commands

2014-01-02 Thread Junio C Hamano
Sebastian Schuberth sschube...@gmail.com writes: Since 2dce956 is_git_command() is a bit slow as it does file I/O in the call to list_commands_in_dir(). Avoid the file I/O by adding an early check for internal commands. I think it is a good thing to check with the list of built-in's first,