diff options
author | Patrick Steinhardt <ps@pks.im> | 2021-08-25 15:49:51 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-25 15:55:29 -0700 |
commit | f54b9f21cab23209697d9985c16a7bf4ee7b4241 (patch) | |
tree | 5268bfcf9f3eaf809f31f45293e3d610c4ec9f88 /Documentation/technical | |
parent | Git 2.33 (diff) | |
download | tgif-f54b9f21cab23209697d9985c16a7bf4ee7b4241.tar.xz |
ls-refs: reuse buffer when sending refs
In the initial reference advertisement, the Git server will first
announce all of its references to the client. The logic is handled in
`send_ref()`, which will allocate a new buffer for each refline it is
about to send. This is quite wasteful: instead of allocating a new
buffer each time, we can just reuse a buffer.
Improve this by passing in a buffer via the `ls_refs_data` struct which
is then reused on each reference.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical')
0 files changed, 0 insertions, 0 deletions