From: "Felipe Contreras" <felipe.contreras@gmail.com>
To: "git list" <git@vger.kernel.org>
Subject: Memory issue with fast-import, why track branches?
Date: Sun, 21 Dec 2008 07:54:57 +0200 [thread overview]
Message-ID: <94a0d4530812202154l26dfe0dfm49397c63dbfdfdf9@mail.gmail.com> (raw)
Hi,
I tracked down an issue I have when importing a big repository. For
some reason memory usage keeps increasing until there is no more
memory.
Here is what valgrind shows:
==21034== 471,080,280 bytes in 114,517 blocks are still reachable in
loss record 8 of 8
==21034== at 0x4004BA2: calloc (vg_replace_malloc.c:397)
==21034== by 0x806A340: xcalloc (wrapper.c:75)
==21034== by 0x8063BC1: use_pack (sha1_file.c:808)
==21034== by 0x8063DA9: unpack_object_header (sha1_file.c:1443)
==21034== by 0x8064F4F: unpack_entry (sha1_file.c:1736)
==21034== by 0x8065393: cache_or_unpack_entry (sha1_file.c:1606)
==21034== by 0x8065464: read_packed_sha1 (sha1_file.c:2000)
==21034== by 0x80655E5: read_object (sha1_file.c:2090)
==21034== by 0x8065677: read_sha1_file (sha1_file.c:2106)
==21034== by 0x8056AE9: parse_object (object.c:190)
==21034== by 0x805E90A: write_ref_sha1 (refs.c:1214)
==21034== by 0x804CC4F: update_branch (fast-import.c:1558)
After looking at the code my guess is that I have a humongous amount
of branches.
Actually they are not really branches, but refs. For each git commit
there's an original mtn ref that I store in 'refs/mtn/sha1', but since
I'm using 'commit refs/mtn/sha1' to store it, a branch is created for
every commit.
I guess there are many ways to fix the issue, but for starters I
wonder why is fast-import keeping track of all the branches? In my
case I would like fast-import to work exactly the same if I specify
branches or not (I'll update them later).
Cheers.
--
Felipe Contreras
next reply other threads:[~2008-12-21 5:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-21 5:54 Felipe Contreras [this message]
2008-12-21 8:10 ` Memory issue with fast-import, why track branches? John Chapman
2008-12-21 11:23 ` Felipe Contreras
2008-12-21 22:17 ` Shawn O. Pearce
2008-12-22 2:36 ` Felipe Contreras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94a0d4530812202154l26dfe0dfm49397c63dbfdfdf9@mail.gmail.com \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).