From: Shawn Pearce <spearce@spearce.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: If I were redoing git from scratch...
Date: Sat, 4 Nov 2006 14:16:51 -0500 [thread overview]
Message-ID: <20061104191651.GC2517@spearce.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0611040829040.25218@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> wrote:
> or for somebody who re-implements git in Java (where
> performance isn't going to be the major issue anyway, and you probably do
> "small" things like "commit" and "diff", and never do full-database things
> like "git repack"), _then_ you can happily look at having something
> fancier. Right now, it's too easy to just look at cumbersome interfaces,
> and forget about the fact that those interfaces is sometimes what allows
> us to practically do some things in the first place.
Yes and no. :-)
As the only person here who has hacked on some of Git and also
reimplemented the core on disk data structures in Java I can say
I mostly agree with Linus.
Abstractions like the repository (to allow different GIT_DIRs to
be used in the same process) isn't really a big deal and is not
a large impact on performance. They could be implemented in the
current C core.
But trying to abstractly represent an object in Java the same
way that it is represented in Git costs a huge amount of memory.
Java is at least 16 bytes of overhead per object, before you get to
store anything in it. Translation: Linus is right, doing a real
implementation of "git repack" in Java is nuts. It would barely
be able to handle git.git, let alone linux.git or mozilla.git.
--
next prev parent reply other threads:[~2006-11-04 19:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-04 11:34 If I were redoing git from scratch Junio C Hamano
2006-11-04 12:21 ` Jakub Narebski
2006-11-04 16:44 ` Linus Torvalds
2006-11-04 19:16 ` Shawn Pearce [this message]
2006-11-04 22:29 ` Robin Rosenberg
2006-11-04 22:44 ` Linus Torvalds
2006-11-04 23:15 ` Linus Torvalds
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=20061104191651.GC2517@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=torvalds@osdl.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).