git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] pack-object: trim memory usage a tiny bit

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Aug 7, 2010, 00:03 UTC
Message-ID
<AANLkTikL8MtqFr1T=3TKA7GLKSEbyvf+6SLTT2BYehto@mail.gmail.com>
In-Reply-To
<AANLkTikphara-0NXaBZ-MAygytGYDuN6ANcMWE+Ni3mW@mail.gmail.com>
2010/8/7 Sverre Rabbelier <srabbelier@gmail.com>:
Show 11 quoted lines
> Heya,
>
> 2010/8/6 Nguyễn Thái Ngọc Duy <pclouds@gmail.com>:
>> This shrinks struct object_entry from 88 bytes to 80 bytes on my 32
>> bit machine. So that would be 12M less on linux-2.6.git (1.6M objects)
>>
>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
>> ---
>>  Don't know if it's really worth a patch..
>
> Either way, some explanation would be nice.

struct object_entry is allocated for every object to be packed. So if you do a clone on linux-2.6, you would need 1.6M of those structs, 88 bytes each. I cut 8 bytes from each of them.

-- 
Duy
Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 3 of 7 in “pack-object: trim memory usage a tiny bit”
  1. pack-object: trim memory usage a tiny bitNguyễn Thái Ngọc Duy, Aug 6, 2010
  2. Sverre RabbelierAug 6, 2010
  3. Nguyen Thai Ngoc DuyAug 7, 2010
  4. Sverre RabbelierAug 7, 2010
  5. Nguyen Thai Ngoc DuyAug 7, 2010
  6. Shawn O. PearceAug 7, 2010
  7. Nguyen Thai Ngoc DuyAug 7, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.