Bug 99364 - FAM iuses quadratic algorithm
FAM iuses quadratic algorithm
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: fam (Show other bugs)
9
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Alexander Larsson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-17 22:29 EDT by Søren Sandmann
Modified: 2007-04-18 12:55 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-05 08:16:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
the patch (922 bytes, patch)
2003-07-17 22:30 EDT, Søren Sandmann
no flags Details | Diff

  None (edit)
Description Søren Sandmann 2003-07-17 22:29:22 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030516
Mozilla Firebird/0.6

Description of problem:
When loading big directories with nautilus, FAM is using a lot of CPU time. I
profiled it and found that the time is spent pretty much exclusively in
DNotify::watch_dir(), specifically in the loop that walks the list of file
watches to see if the file is already watched.

I'm attaching a patch that just looks in the existing hash table and checks if
the filewatch->dir_watch is equal to the current dir_watch. I am not actually
sure that last check is necessary, though.

The closest thing to real numbers I have is the time it takes nautilus to load
/dev. It was around 23 seconds before and is around 18 seconds now.



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


How reproducible:
Always

Steps to Reproduce:
1. n/a
2. 
3.     

Additional info:
Comment 1 Søren Sandmann 2003-07-17 22:30:51 EDT
Created attachment 92997 [details]
the patch
Comment 2 Alexander Larsson 2003-08-05 08:16:27 EDT
Fixed in 2.6.8-11. I also changed the hashtable sizes to be slightly larger and
have prime sizes.

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