[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:22:22 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 67bc4b9897d872795eac7427cdd4c5f9efbc94f1
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jul 1 17:00:47 2002 +0000

    2002-07-01  Kenneth Kocienda  <kocienda at apple.com>
    
            Fix for this bug:
    
            Radar 2967062 (alexander has fit on exit)
    
            We no longer sync the contents of the cache to disk at quit time. I also
            shortented the amount of time of disk cache waits before
            declaring "idle time" from 5 seconds to 1 second. This might
            need some tuning, but it should keep the disk cache queue with i
            writes pending from getting too long, while not stepping on more i
            time-critical things like page rendering.
    
            * CacheLoader.subproj/IFURLLoadManager.m:
            (-[IFURLLoadManager initWithDefaultStack])
            (-[IFURLLoadManager loadDidFinish:])
            * Database.subproj/IFURLFileDatabase.m:
            (-[IFURLFileDatabase dealloc])
            (-[IFURLFileDatabase setTimer])
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1482 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Misc.subproj/WebFileDatabase.m b/WebKit/Misc.subproj/WebFileDatabase.m
index 5769c22..9d6f5ec 100644
--- a/WebKit/Misc.subproj/WebFileDatabase.m
+++ b/WebKit/Misc.subproj/WebFileDatabase.m
@@ -31,8 +31,7 @@ typedef enum
 enum
 {
     MAX_UNSIGNED_LENGTH = 20, // long enough to hold the string representation of a 64-bit unsigned number
-    SYNC_INTERVAL = 5,
-    SYNC_IDLE_THRESHOLD = 5,
+    SYNC_IDLE_THRESHOLD = 1,
 };
 
 // support for expiring cache files using file system access times --------------------------------------------
@@ -487,9 +486,12 @@ static void databaseInit()
 
 -(void)dealloc
 {
+    [mutex lock];
+    // this locking gives time for writes that are happening now to finish
+    [mutex unlock];
     [self close];
-    [self sync];
-    
+    [timer invalidate];
+    [timer release];
     [ops release];
     [setCache release];
     [removeCache release];
@@ -501,7 +503,7 @@ static void databaseInit()
 -(void)setTimer
 {
     if (timer == nil) {
-        timer = [[NSTimer scheduledTimerWithTimeInterval:SYNC_INTERVAL target:self selector:@selector(lazySync:) userInfo:nil repeats:YES] retain];
+        timer = [[NSTimer scheduledTimerWithTimeInterval:SYNC_IDLE_THRESHOLD target:self selector:@selector(lazySync:) userInfo:nil repeats:YES] retain];
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list