git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Federico Galassi <federico.galassi@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Question about your comment on the git parable
Date: Sun, 26 Feb 2012 15:10:32 +0100	[thread overview]
Message-ID: <201202261510.32978.jnareb@gmail.com> (raw)
In-Reply-To: <4B4C5353-9820-4068-92DA-50665B1011E1@gmail.com>

Federico Galassi wrote:
> On 26/feb/2012, at 13:03, Jakub Narebski wrote:
>> Jakub Narebski wrote:

[...]
>>> Note also that the staging area is also a performance hack (perhaps it
>>> began as such; I am not sure about this aspect of git history).  Git uses
>>> it to be able to _cheaply_ check which files were changed.
>> 
>> The first name for staging area, _dircache_, hints at this.
> 
> Unfortunately, i'm not into git development. Do you have a clue on why
> the index, apparently a tree referring to objects, is much faster than
> reading that stuff right from the database?  

The index (at the very beginning "dircache"), or the staging area, stores
more information that are saved in object database, for example stat
information (file metadata).  Most of file metadata is highly local, so
it doesn't make sense to save it in object database of repository, but
it is used to avoid a file read: usually stat-ing a file, which is much
more cheap, is enough to notice that the file did not change.

-- 
Jakub Narebski
Poland

       reply	other threads:[~2012-02-26 14:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <A98A438D-76DD-41B5-B8E1-6FA170B00801@gmail.com>
     [not found] ` <201202261303.38957.jnareb@gmail.com>
     [not found]   ` <4B4C5353-9820-4068-92DA-50665B1011E1@gmail.com>
2012-02-26 14:10     ` Jakub Narebski [this message]
     [not found] ` <201202261229.51199.jnareb@gmail.com>
     [not found]   ` <1E5ECB5A-595A-4B04-8269-6E35BF3FEA1A@gmail.com>
2012-02-26 15:06     ` Question about your comment on the git parable Jakub Narebski
2012-02-28  2:41       ` Neal Kreitzinger

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=201202261510.32978.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=federico.galassi@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).