git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Possible improvement in DB structure
@ 2019-12-23 13:00 Arnaud Bertrand
  2019-12-23 19:09 ` brian m. carlson
  0 siblings, 1 reply; 4+ messages in thread
From: Arnaud Bertrand @ 2019-12-23 13:00 UTC (permalink / raw)
  To: git

Hello,

According to my understanding, git has only 3 kinds of objects:
(excluding the packed version)
- the blobs
- the trees
- the commits

Today to parse all objects of the same type, it is necessary to parse
all the objects and test them one by one.

It should be so simple to organize objects in
.git/objects/blobs
.git/objects/trees
.git/object/commits

May be due to my limited knowledge of git, I don't see any advantage
to put everything together.
By splitting the objects directory, the gain in performance could be
important, the scripts simplified, the representation more clear.

To be backward compatible, we can imagine a get-object() function that parses
.git/objects/blobs
.git/objects/trees
.git/object/commits
and, when not found
.git/objects

A get-tree() function that first parses
git/objects/trees
and when not found
.git/objects

idem for getblob() and getcommit()

Is there a reason that I don't understand behind the decision to put
everything together ?

Best regards,

Arnaud Bertrand

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-23 21:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-23 13:00 Possible improvement in DB structure Arnaud Bertrand
2019-12-23 19:09 ` brian m. carlson
2019-12-23 20:46   ` Arnaud Bertrand
2019-12-23 21:41     ` Jonathan Nieder

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).