Bug 182015 - mlocate is very slow when performing case insensitive search
mlocate is very slow when performing case insensitive search
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mlocate (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-18 23:07 EST by Need Real Name
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 0.14-0.fc5.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-29 17:09:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2006-02-18 23:07:18 EST
Description of problem:
mlocate is very slow when performing a search using the '-i' arguement.

Version-Release number of selected component (if applicable):
mlocate-0.12-1.2

How reproducible:
locate -i *

Steps to Reproduce:
1. run the command, locate -i *
  
Actual results:
Slow

Expected results:
Fast

Additional info:

Compare the real times for mlocate with and without '-i':
$ time mlocate -i *.mp3
real    0m5.587s
user    0m4.816s
sys     0m0.028s

$ time mlocate *.mp3
real    0m1.749s
user    0m0.556s
sys     0m0.020s

Compare the real times for slocate with and without '-i':
$ time slocate -i *.mp3
real    0m2.187s
user    0m0.176s
sys     0m0.044s

$ time slocate *.mp3
real    0m2.150s
user    0m0.140s
sys     0m0.024s
Comment 1 Miloslav Trmač 2006-02-19 02:59:17 EST
How's this? (mlocate-0.14 user times)
    .ogg: 0m0.144s
   *.ogg: 0m0.596s
-i  .ogg: 0m0.856s
-i *.ogg: 0m1.124s

From looking at the code (not trying it), case-insensitive search in slocate
most likely doesn't handle UTF-8 properly.  Similar speedup can be achieved by
running mlocate with LC_ALL=C:

(LC_ALL=C mlocate-0.14 user times)
    .ogg: 0m0.132s
   *.ogg: 0m0.280s
-i  .ogg: 0m0.872s
-i *.ogg: 0m0.320s

(Yes, LC_ALL=C mlocate -i .ogg could be sped up further, but that's IMHO not
worth worrying about.)


We are now frozen for FC5, I'll push this as an update after the release.
Comment 2 Need Real Name 2006-02-19 14:12:43 EST
Thanks for the update.  Gnome-search-tool uses the locate command to help speed
up finding files so with the current version of mlocate (0.12-1.2) its
performance has been noticeably degraded.  I look forward to seeing mlocate-0.14
released.
Comment 3 Fedora Update System 2006-03-20 10:25:05 EST
mlocate-0.14-0.fc5.1 has been pushed for FC5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.
Comment 4 Fedora Update System 2006-03-29 13:40:23 EST
mlocate-0.14-0.fc5.1 has been pushed for FC5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.