[webkit-changes] cvs commit: WebKit/WebView.subproj WebPreferences.m

David hyatt at opensource.apple.com
Tue Sep 6 14:40:13 PDT 2005


hyatt       05/09/06 14:40:13

  Modified:    .        ChangeLog
               History.subproj WebBackForwardList.m
               WebView.subproj WebPreferences.m
  Log:
  	Reduce the # of cached pages for a back/forward list.  The old cache would cache the
  	following per tab:
  	> 1gb memory = 16 pages per tab/window
  	> 512mb memory = 8 pages per tab/window
  	<= 512mb memory = 4 pages per tab/window
  
  	This consumes far too much memory and is way too aggressive.  The new cache sizes are
  	as follows:
  	>= 1gb memory = 3 pages per tab/window
  	>= 512mb memory = 2 pages per tab/window
  	< 512mb memory = 1 page per tab/window
  
          Reviewed by john
  
          * History.subproj/WebBackForwardList.m:
          (-[WebBackForwardList pageCacheSize]):
          * WebView.subproj/WebPreferences.m:
          (+[WebPreferences initialize]):
  
  Revision  Changes    Path
  1.3311    +21 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3310
  retrieving revision 1.3311
  diff -u -r1.3310 -r1.3311
  --- ChangeLog	5 Sep 2005 23:12:40 -0000	1.3310
  +++ ChangeLog	6 Sep 2005 21:40:10 -0000	1.3311
  @@ -1,3 +1,24 @@
  +2005-09-06  David Hyatt  <hyatt at apple.com>
  +
  +	Reduce the # of cached pages for a back/forward list.  The old cache would cache the
  +	following per tab:
  +	> 1gb memory = 16 pages per tab/window
  +	> 512mb memory = 8 pages per tab/window
  +	<= 512mb memory = 4 pages per tab/window
  +
  +	This consumes far too much memory and is way too aggressive.  The new cache sizes are
  +	as follows:
  +	>= 1gb memory = 3 pages per tab/window
  +	>= 512mb memory = 2 pages per tab/window
  +	< 512mb memory = 1 page per tab/window
  +
  +        Reviewed by john
  +
  +        * History.subproj/WebBackForwardList.m:
  +        (-[WebBackForwardList pageCacheSize]):
  +        * WebView.subproj/WebPreferences.m:
  +        (+[WebPreferences initialize]):
  +
   2005-09-05  Darin Adler  <darin at apple.com>
   
           Reviewed by John Sullivan.
  
  
  
  1.45      +6 -7      WebKit/History.subproj/WebBackForwardList.m
  
  Index: WebBackForwardList.m
  ===================================================================
  RCS file: /cvs/root/WebKit/History.subproj/WebBackForwardList.m,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- WebBackForwardList.m	5 Jun 2005 17:54:23 -0000	1.44
  +++ WebBackForwardList.m	6 Sep 2005 21:40:12 -0000	1.45
  @@ -310,13 +310,14 @@
       if (_private->pageCacheSize == COMPUTE_DEFAULT_PAGE_CACHE_SIZE) {
           unsigned s;
           vm_size_t memSize = WebSystemMainMemory();
  -        unsigned multiplier = 1;
           
           s = [[WebPreferences standardPreferences] _pageCacheSize];
  -        if (memSize > 1024 * 1024 * 1024)
  -            multiplier = 4;
  -        else if (memSize > 512 * 1024 * 1024)
  -            multiplier = 2;
  +        if (memSize >= 1024 * 1024 * 1024)
  +            _private->pageCacheSize = s;
  +        else if (memSize >= 512 * 1024 * 1024)
  +	    _private->pageCacheSize = s - 1;
  +	else
  +	    _private->pageCacheSize = s - 2;
   
   #ifndef NDEBUG
           if (!loggedPageCacheSize){
  @@ -324,8 +325,6 @@
               loggedPageCacheSize = YES;
           }
   #endif
  -
  -        _private->pageCacheSize = s * multiplier;
       }
       
       return _private->pageCacheSize;
  
  
  
  1.98      +1 -1      WebKit/WebView.subproj/WebPreferences.m
  
  Index: WebPreferences.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebPreferences.m,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- WebPreferences.m	16 Aug 2005 19:03:35 -0000	1.97
  +++ WebPreferences.m	6 Sep 2005 21:40:13 -0000	1.98
  @@ -212,7 +212,7 @@
           @"16",                          WebKitDefaultFontSizePreferenceKey,
           @"13",                          WebKitDefaultFixedFontSizePreferenceKey,
           @"ISO-8859-1",                  WebKitDefaultTextEncodingNamePreferenceKey,
  -        @"4",                           WebKitPageCacheSizePreferenceKey,
  +        @"3",                           WebKitPageCacheSizePreferenceKey,
           @"8388608",                     WebKitObjectCacheSizePreferenceKey,
           [NSNumber numberWithBool:NO],   WebKitUserStyleSheetEnabledPreferenceKey,
           @"",                            WebKitUserStyleSheetLocationPreferenceKey,
  
  
  



More information about the webkit-changes mailing list