Re: [RFC/PATCH 2/2] gitweb: Add an option to show size of blobs in the tree view

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

 



On Wed, 1 Aug 2007, Junio C Hamano wrote:
> Jakub Narebski <jnareb@xxxxxxxxx> writes:
> 
>> It allows to play with 'tree' view with blob size. Currently you
>> have to start browsing by adding ";opt=-l" to the gitweb URL by
>> hand.  There is not link which will change view from ordinary 'tree'
>> view to 'tree' view with blob sizes.
>>
>> The 'tree' with blob size view is slightly more costly than the
>> ordinary, old 'tree' view, but not much more (0.018s vs 0.012s
>> in the hot cache case), so I don't think we need to control it
>> as a enabled (or disabled) feature, overrideable or not.  It
>> probably should not be default.
> 
> I do not think there is any reason to forbid its use, as the
> "-l" to ls-tree was introduced for exactly this purpose,
> However, it might make sense to make the use of -l optional via
> the %feature mechanism.  50% increase even on hot cache case is
> not a price people who run busy sites would want to pay.

It's 0.014s vs 0.009s - 0.010s on root dir of repacked git.git 
repository. It is I think caused by the fact that "git ls-tree -l 
<tree-ish>" has to look up each blob in the tree, and read its
header. IIRC header is uncompressed, so it doesn't need deflating;
if it is compressed, then we have to add deflating to that. The
blob size (object size) is not present in the tree object structure.
Perhaps it is something to have in mind when designing and implementing
new packv4 with its creating tree objects on demand.

But I agree that this should be protected by the %feature mechanism.
Two questions:

 1. Should we make '-l' default when turned on? Or make 'showsizes'
    %feature tristate: off, on, by default on?

 2. If it is turned off, should we silently (or not so silently)
    ignore this option, or return "Permission denied" or perhaps
    "Invalid extra options parameter"?

And how we should name this feature (key in %feature hash)?


P.S. I have received no comments on
 [RFC/PATCH] gitweb: Enable transparent compression for HTTP output
(trade CPU load for lower bandwidth usage).

-- 
Jakub Narebski
Poland
-
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