git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: David Brown <git@davidb.org>, Alex Riesen <raa.lkml@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Johannes Sixt <j.sixt@viscovery.net>,
	git@vger.kernel.org
Subject: Re: [PATCH] Make use of stat.ctime configurable
Date: Mon, 28 Jul 2008 18:23:56 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0807281817230.3486@nehalem.linux-foundation.org> (raw)
In-Reply-To: <7vbq0ho5g7.fsf@gitster.siamese.dyndns.org>



On Mon, 28 Jul 2008, Junio C Hamano wrote:
> >
> > Anybody who uses extended attributes as part of a indexing scheme is just 
> > insane. Modifying the file you are indexing is not just fundamentally 
> > wrong to begin with, but it will then also be incredibly inefficient to 
> > read those entries one at a time.
> 
> It's a typo and you are saying it _is_ fundamentally wrong, aren't you?

Not a typo, and I'm sayin that "it's not _just_ fundamentally wrong"

So yes, it's fundamentally wrong, but it's worse than that. It's 
fundamentally wrong _and_ it's inefficient as hell.

> If you are prepared to pick up new files, you need to crawl everywhere
> anyway, so if the xattr is used to leave a mark "The last time I looked at
> this file was this" in the file itself, it does not sound too bad to me.

It's absolutely horrible. 

It means that you have another extra indirection and accompanying disk 
seek to check the thing. It's a total performance nightmare. Trust me, 
anybody who uses extended attributes like this simply does not know what 
he is doing.

> It would be irritating that it touches ctime, though, but I do not use it
> http://beagle-project.org/FAQ "Do I really need extended attributes?"
> talks about BEAGLE_DISABLE_XATTR environment variable and interestingly
> it says disabling use of xattr would slow you down.

They don't have a clue. They say that, but it's simply not true. 

Of course, the fact that they think it is probably implies that they did 
something EVEN MORE STUPID for the non-xattr case. That wouldn't surprise 
me at all. If I had to guess, I'd guess that they used an SQL database and 
query language, and did all their tests with hot caches too.

The kernel does caching really well, and the kernel is fast as hell, so 
_of_course_ when you benchmark, using kernel data structures looks good, 
especially if you benchmark against code that isn't well written for the 
particular usage case.

			Linus

  reply	other threads:[~2008-07-29  1:28 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-21 17:35 [PATCH] Fix update-index --refresh for submodules if stat(2) returns st_size 0 Alex Riesen
2008-07-21 18:20 ` Johannes Schindelin
2008-07-21 19:43   ` Alex Riesen
2008-07-21 23:26     ` Johannes Schindelin
2008-07-22  8:07     ` Junio C Hamano
2008-07-22 16:49       ` Alex Riesen
2008-07-22  7:17 ` Johannes Sixt
2008-07-22 16:46   ` Alex Riesen
2008-07-22 16:59     ` Johannes Sixt
2008-07-22 17:28   ` Junio C Hamano
2008-07-22 19:39     ` [PATCH] Build configuration to skip ctime for modification test Alex Riesen
2008-07-22 20:17       ` Johannes Schindelin
2008-07-22 20:31         ` Alex Riesen
2008-07-23  0:12           ` Junio C Hamano
2008-07-23 16:46             ` Alex Riesen
2008-07-23 16:59               ` Johannes Schindelin
2008-07-23 19:16                 ` Alex Riesen
2008-07-25  2:00                   ` Linus Torvalds
2008-07-25  5:55                     ` Alex Riesen
2008-07-26  0:57                       ` Johannes Schindelin
2008-07-26 15:38                         ` [PATCH] Make use of stat.ctime configurable Alex Riesen
2008-07-27 19:46                           ` Junio C Hamano
2008-07-27 19:46                           ` Junio C Hamano
2008-07-28  6:31                             ` Alex Riesen
2008-07-28 16:04                               ` David Brown
2008-07-28 16:09                                 ` Linus Torvalds
2008-07-28 21:49                                   ` Alex Riesen
2008-07-29  1:16                                   ` Junio C Hamano
2008-07-29  1:23                                     ` Linus Torvalds [this message]
2008-07-29  1:31                                       ` Junio C Hamano
2008-07-29  1:41                                         ` David Brown
2008-07-29  2:49                                           ` Junio C Hamano
2008-07-29 10:45                                           ` Johannes Schindelin
2008-07-29  1:55                                         ` Linus Torvalds
2008-07-29  2:01                                           ` Linus Torvalds
2008-07-29 10:49                                       ` Johannes Schindelin
2008-07-28 16:20                               ` Petr Baudis
2008-07-28 21:47                                 ` [PATCH] Improve the placement of core.trustctime in the documentation Alex Riesen
2008-07-29  6:23                                   ` Junio C Hamano
2008-07-24 19:00             ` [PATCH] Do not use ctime if file mode is not used Alex Riesen
2008-07-23 16:00           ` git svn throws locale related error when built from source Anton Mostovoy

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=alpine.LFD.1.10.0807281817230.3486@nehalem.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@davidb.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=raa.lkml@gmail.com \
    /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).