On Wed, Jan 17, 2018 at 12:54:33PM -0800, Junio C Hamano wrote:
> Jeff Hostetler writes:
>
> >> void sha1_file_name(struct strbuf *buf, const unsigned char
> >> *sha1)
> >> {
> >> - strbuf_addf(buf, "%s/", get_object_directory());
> >> + const char *obj_dir =
On Wed, Jan 17, 2018 at 9:37 PM, Jeff Hostetler wrote:
>
>
> On 1/17/2018 12:54 PM, Christian Couder wrote:
>>
>> As sha1_file_name() could be performance sensitive, let's
>> try to make it faster by seeding the initial buffer size
>> to avoid any need to realloc and by
Jeff Hostetler writes:
>> void sha1_file_name(struct strbuf *buf, const unsigned char
>> *sha1)
>> {
>> -strbuf_addf(buf, "%s/", get_object_directory());
>> +const char *obj_dir = get_object_directory();
>> +size_t extra = strlen(obj_dir) + 1 +
On 1/17/2018 12:54 PM, Christian Couder wrote:
As sha1_file_name() could be performance sensitive, let's
try to make it faster by seeding the initial buffer size
to avoid any need to realloc and by using strbuf_addstr()
and strbuf_addc() instead of strbuf_addf().
Helped-by: Derrick Stolee
As sha1_file_name() could be performance sensitive, let's
try to make it faster by seeding the initial buffer size
to avoid any need to realloc and by using strbuf_addstr()
and strbuf_addc() instead of strbuf_addf().
Helped-by: Derrick Stolee
Helped-by: Jeff Hostetler
5 matches
Mail list logo