Bug 99364 - FAM iuses quadratic algorithm
Summary: FAM iuses quadratic algorithm
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fam (Show other bugs)
(Show other bugs)
Version: 9
Hardware: i386 Linux
medium
low
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-18 02:29 UTC by Søren Sandmann
Modified: 2007-04-18 16:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-05 12:16:27 UTC
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-18 02:30 UTC, Søren Sandmann
no flags Details | Diff

Description Søren Sandmann 2003-07-18 02:29:22 UTC
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-18 02:30:51 UTC
Created attachment 92997 [details]
the patch

Comment 2 Alexander Larsson 2003-08-05 12:16:27 UTC
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.