{"thread":{"id":"31743","subject":"Applying git technology to fix the locate command","startedAt":"2012-10-07T18:39:57Z","lastAt":"2012-10-07T19:18:07Z","messageCount":2,"participants":["jonsmirl@gmail.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"200703","messageId":"CAKON4OzyAt-e0Ygj=7+Ze7ywU+RNTsi-Nn5huCnEWy8o=a-EUA@mail.gmail.com","threadId":"31743","inReplyTo":null,"subject":"Applying git technology to fix the locate command","fromName":"jonsmirl@gmail.com","fromEmail":"jonsmirl@gmail.com","sentAt":"2012-10-07T18:39:57Z","receivedAt":"2012-10-07T18:39:57Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"I've been using the Dash HUD in Ubuntu and it's performance is\nterrible to the point of being unusable. So I started top and noticed\nthat it was forking 'locate' and locate was pegging my CPU at 100%\nwhile I tried typing into their incremental search.\n\nNext I looked at the mlocate database. It is 350MB on my desktop and\nindexing 10,388,379 files. Not quite sure why I have 10M files on my\ndesktop - probably because links are making files appear multiple\ntimes.\n\nTyping a non-existent string into locate takes over 10s to respond and\nthat's with the db cached in RAM.\n\njonsmirl@terra:/$ time locate lelelekddmd\nreal\t0m10.645s\nuser\t0m10.537s\nsys\t0m0.064s\n\nGit has to deal with similar path compression and it responds pretty\nmuch instantly. I'm wondering if any of you git gurus could apply some\nknowledge from git and use it to fix locate?\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"200704","messageId":"CAKON4OwRuEhaHhCkv6oS+wL1NEp-3DyWcYbRqq5=RKuqgs8f0g@mail.gmail.com","threadId":"31743","inReplyTo":"CAKON4OzyAt-e0Ygj=7+Ze7ywU+RNTsi-Nn5huCnEWy8o=a-EUA@mail.gmail.com","subject":"Re: Applying git technology to fix the locate command","fromName":"jonsmirl@gmail.com","fromEmail":"jonsmirl@gmail.com","sentAt":"2012-10-07T19:18:07Z","receivedAt":"2012-10-07T19:18:07Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"I played around with updatedb.conf to exclude .git files and my\n/exports directory. I got the db down to 136MB and 4.5s for a null\nsearch.  This command still needs help.  Given that I have the entire\ndb file cached it should be able to respond instantly on a null\nsearch.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"}]}