Re: [PATCH] gitweb: speed up project listing on large work trees by limiting find depth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luke Lu <git@xxxxxxxxxx> wrote:
> OK, let me try again :) I was using no_chdir => 1 to shorten the tr,  
> as well as saving a syscall. However the code is expecting $_ to be  
> relative elsewhere (line 1524) to check for the toplevel, so the  
> check failed for the toplevel because of no_chdir, which caused  
> substr to work on the toplevel, which is $pfxlen long. Note $pfxlen +  
> 1 passes the end of the toplevel path, hence the errors, though the  
> program still worked correctly, as $subdir is undefined in this case,  
> which would by pass the rest of the code, which is logically correct.  
> It'll probably crash, if it's written in C :)
> 
> So, I got rid of no_chdir => 1 in the new patch and uses  
> $File::Find::name directly, as otherwise I'd have to come up with a  
> messier regex for checking toplevel at line 1524.

*light dawns*.  Thank you for the explanation.

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux