Bug 182015 - mlocate is very slow when performing case insensitive search
Summary: mlocate is very slow when performing case insensitive search
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mlocate
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-19 04:07 UTC by Need Real Name
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 0.14-0.fc5.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-29 22:09:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2006-02-19 04:07:18 UTC
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 07:59:17 UTC
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 19:12:43 UTC
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 15:25:05 UTC
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 18:40:23 UTC
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.