[Teammetrics-discuss] Commit Stat.

Andreas Tille andreas at an3as.eu
Fri Oct 14 21:39:56 UTC 2011


On Fri, Oct 14, 2011 at 08:10:20PM +0530, Sukhbir Singh wrote:
> 
> Hmm. The only problem is that we cannot do anything beforehand. Like
> for example, even if I have to check how many lines a commit has,

My idea was *not* to count the lines at all if the size in Bytes of a
commit exceeds a certain limit.  So the limit is not the number of lines
(which for sure will not be stored somewhere) but rather the size in
bytes (which might or might bot be stored somewhere - this is subject
for your research).

> have to download it completely. Sure, after downloading, I can
> implement this check :
> 
> if (number_of_lines > $THRESHOLD_LIMIT)
>       skip parsing

No, taht's stupid because if the assumption that large commits are
binary you will not habe number_of_lines for sure.
 
> But then, if I have already downloaded the commit, it's not much more
> work to calculate the lines added/ deleted. The bottleneck is
> _getting_ the 2GB commit data.

So just try to do some research to know the size before downloading.
 
> Ok, I will do that. But the only way I see as to how to make this
> better is to dump the data to a file instead of keeping it buffered. I
> will try.

As I said - I'm not an expert and thus I can't say whether you are right
or wrong with your assumption. 

Kind regards

        Andreas.

-- 
http://fam-tille.de



More information about the Teammetrics-discuss mailing list