summaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorLibravatar Patrick Steinhardt <ps@pks.im>2021-08-25 15:49:51 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-08-25 15:55:29 -0700
commitf54b9f21cab23209697d9985c16a7bf4ee7b4241 (patch)
tree5268bfcf9f3eaf809f31f45293e3d610c4ec9f88 /Documentation/technical
parentGit 2.33 (diff)
downloadtgif-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