git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Michael Niedermayer <michaelni@gmx.at>,
	Petr Baudis <pasky@ucw.cz>
Subject: Re: suggestions for gitweb
Date: Sun, 13 May 2007 13:50:04 +0200	[thread overview]
Message-ID: <200705131350.04916.jnareb@gmail.com> (raw)
In-Reply-To: <7vabw9v906.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> Lines of code and file sizes: file size needs additional invocation
>> per each file for gitweb; it would be easier for cgit. Costly!
>> Counting LOC is even more costly: take note that 1.) gitweb operates
>> directly on repository / object database, and does not use working
>> area, 2.) git is snapshot based and not changeset based.
> 
> We earlier discussed to make --numstat to allow us add this kind
> of information for easier script consumption.
> 
> Perhaps instead of modifying --numstat, we may be better off to
> add another format that can be more easily extended to support
> other things, like we do for the --porcelain format out of
> git-blame?  It does not have to be one line per record, like the
> way --numstat was done, which was primarily in order to make it
> a compact, human readable format.

Even if we extend --numstat or add yet another diff format meant for
porcelain[*1*], and optionally add similar extension to git-ls-tree
(as I think object size and LOC of file should be placed there), and
the cost of additional fork and exec is not an issue, such extra 
information be still costly in terms of performance: CPU and I/O.

Currently for difftree (whatchanged-like) we need only to compare
trees. For lines added / lines removed statistics we need to _generate_ 
diff.

For file size (object size) we need at least find the object in question 
and read it's header; for lines of code we need to get blob contents
(find object, uncompress, optionally undeltify) and count the lines.

Its not insurmountable: we can use %feature for that, like in the case
of other CPU-intensive features like 'blame' or 'pickaxe', or 
high-bandwidth features like 'snapshot'.


Footnotes:
----------
[*1*] What we should name it? --numstat-extended, --machinestat,
--porcelain, --allstat, <insert your own idea here>?

-- 
Jakub Narebski
Poland

  reply	other threads:[~2007-05-13 23:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-12 20:55 suggestions for gitweb Michael Niedermayer
2007-05-12 22:39 ` Junio C Hamano
2007-05-12 23:15   ` Aaron Gray
2007-05-13  0:41     ` Jakub Narebski
2007-05-13  0:54       ` Junio C Hamano
2007-05-13 11:50         ` Jakub Narebski [this message]
2007-05-13 16:52       ` Lars Hjemli
2007-05-14  7:31         ` Suggestions for cgit (was: Re: suggestions for gitweb) Jakub Narebski
2007-05-14  8:50           ` Lars Hjemli
2007-05-15 12:57             ` Lars Hjemli
2007-05-13  0:01   ` suggestions for gitweb Michael Niedermayer
2007-05-13 11:18     ` Jakub Narebski
2007-05-14  0:28       ` Junio C Hamano
2007-05-14  1:08     ` Petr Baudis
2007-05-14  2:00       ` Michael Niedermayer
2007-05-14  2:36         ` Petr Baudis
2007-05-14  8:53           ` Michael Niedermayer
2007-05-14  9:58             ` Petr Baudis
2007-05-14 16:49               ` Jakub Narebski
2007-05-14 17:37                 ` Michael Niedermayer
2007-05-15 15:46         ` Jan Hudec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200705131350.04916.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=michaelni@gmx.at \
    --cc=pasky@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).