Files
git/builtin
Nguyễn Thái Ngọc Duy 417305764a index-pack: reduce object_entry size to save memory
For each object in the input pack, we need one struct object_entry. On
x86-64, this struct is 64 bytes long. Although:

 - The 8 bytes for delta_depth and base_object_no are only useful when
   show_stat is set. And it's never set unless someone is debugging.

 - The three fields hdr_size, type and real_type take 4 bytes each
   even though they never use more than 4 bits.

By moving delta_depth and base_object_no out of struct object_entry
and make the other 3 fields one byte long instead of 4, we shrink 25%
of this struct.

On a 3.4M object repo (*) that's about 53MB. The saving is less
impressive compared to index-pack memory use for basic bookkeeping (**),
about 16%.

(*) linux-2.6.git already has 4M objects as of v3.19-rc7 so this is
not an unrealistic number of objects that we have to deal with.

(**)  3.4M * (sizeof(object_entry) + sizeof(delta_entry)) = 311MB

Brought-up-by: Matthew Sporleder <msporleder@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-02-27 12:23:25 -08:00
..
2014-11-21 10:19:14 -08:00
2014-07-16 11:10:11 -07:00
2014-12-22 12:27:36 -08:00
2015-01-22 13:46:38 -08:00
2014-12-22 12:27:12 -08:00
2014-12-22 09:57:42 -08:00
2015-01-07 12:42:13 -08:00
2014-01-17 12:21:20 -08:00
2015-01-14 12:32:39 -08:00
2014-09-02 12:00:30 -07:00
2014-11-25 15:24:55 -08:00
2014-10-29 10:07:56 -07:00
2014-04-30 10:30:02 -07:00
2015-01-07 12:55:05 -08:00
2014-10-08 13:05:25 -07:00