git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Applying git technology to fix the locate command
@ 2012-10-07 18:39 jonsmirl
  2012-10-07 19:18 ` jonsmirl
  0 siblings, 1 reply; 2+ messages in thread
From: jonsmirl @ 2012-10-07 18:39 UTC (permalink / raw)
  To: Git Mailing List

I've been using the Dash HUD in Ubuntu and it's performance is
terrible to the point of being unusable. So I started top and noticed
that it was forking 'locate' and locate was pegging my CPU at 100%
while I tried typing into their incremental search.

Next I looked at the mlocate database. It is 350MB on my desktop and
indexing 10,388,379 files. Not quite sure why I have 10M files on my
desktop - probably because links are making files appear multiple
times.

Typing a non-existent string into locate takes over 10s to respond and
that's with the db cached in RAM.

jonsmirl@terra:/$ time locate lelelekddmd
real	0m10.645s
user	0m10.537s
sys	0m0.064s

Git has to deal with similar path compression and it responds pretty
much instantly. I'm wondering if any of you git gurus could apply some
knowledge from git and use it to fix locate?

-- 
Jon Smirl
jonsmirl@gmail.com

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

* Re: Applying git technology to fix the locate command
  2012-10-07 18:39 Applying git technology to fix the locate command jonsmirl
@ 2012-10-07 19:18 ` jonsmirl
  0 siblings, 0 replies; 2+ messages in thread
From: jonsmirl @ 2012-10-07 19:18 UTC (permalink / raw)
  To: Git Mailing List

I played around with updatedb.conf to exclude .git files and my
/exports directory. I got the db down to 136MB and 4.5s for a null
search.  This command still needs help.  Given that I have the entire
db file cached it should be able to respond instantly on a null
search.

-- 
Jon Smirl
jonsmirl@gmail.com

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

end of thread, other threads:[~2012-10-07 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-07 18:39 Applying git technology to fix the locate command jonsmirl
2012-10-07 19:18 ` jonsmirl

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).