Re: speeding up cg-log -u
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:41:57
quoted
quoted
quoted
quoted
"PB" == Petr Baudis [off-list ref] writes:
PB> Dear diary, on Sat, May 14, 2005 at 11:50:24AM CEST, I got a letter PB> where Junio C Hamano [off-list ref] told me that...
quoted
+ buffer = read_sha1_file(item->object.sha1, type, &size);
PB> If it do that, I wonder how much speedup would be using this instead. PB> But probably still significant one. I would imagine so (only benchmark would tell), because you would not spawn git-cat-file for each individual commit object. Whenever I work with those "struct object" derivatives, I get very frustrated by the fact that they are designed to cater only to the need of very narrow immediate users. The first round of tree objects did not even have names for each entry because the only thing it cared about was connectivity checking, and for that purpose callers would not care about what each blob or subtree was referred as. Now when I want to use commit objects I find that it only records the commit date (other than connectivity information). It really appears that connectivity is the primary thing and everything else is bolted on top. Not wanting to keep the whole object because of their size is understandable since the users of "struct object" derivatives rarely if ever seem to free them once they get hold of them. And not wanting to think ahead about what is worth keeping (like names for tree entries back then, or commit author names) is also understandable, but it still is frustrating. Not that I would want to solve this myself ...