Changeset 10476 in webkit


Ignore:
Timestamp:
Sep 6, 2005, 2:40:13 PM (19 years ago)
Author:
hyatt
Message:

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]):
Location:
trunk/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/ChangeLog

    r10474 r10476  
     12005-09-06  David Hyatt  <hyatt@apple.com>
     2
     3        Reduce the # of cached pages for a back/forward list.  The old cache would cache the
     4        following per tab:
     5        > 1gb memory = 16 pages per tab/window
     6        > 512mb memory = 8 pages per tab/window
     7        <= 512mb memory = 4 pages per tab/window
     8
     9        This consumes far too much memory and is way too aggressive.  The new cache sizes are
     10        as follows:
     11        >= 1gb memory = 3 pages per tab/window
     12        >= 512mb memory = 2 pages per tab/window
     13        < 512mb memory = 1 page per tab/window
     14
     15        Reviewed by john
     16
     17        * History.subproj/WebBackForwardList.m:
     18        (-[WebBackForwardList pageCacheSize]):
     19        * WebView.subproj/WebPreferences.m:
     20        (+[WebPreferences initialize]):
     21
    1222005-09-05  Darin Adler  <darin@apple.com>
    223
  • trunk/WebKit/History.subproj/WebBackForwardList.m

    r9276 r10476  
    311311        unsigned s;
    312312        vm_size_t memSize = WebSystemMainMemory();
    313         unsigned multiplier = 1;
    314313       
    315314        s = [[WebPreferences standardPreferences] _pageCacheSize];
    316         if (memSize > 1024 * 1024 * 1024)
    317             multiplier = 4;
    318         else if (memSize > 512 * 1024 * 1024)
    319             multiplier = 2;
     315        if (memSize >= 1024 * 1024 * 1024)
     316            _private->pageCacheSize = s;
     317        else if (memSize >= 512 * 1024 * 1024)
     318            _private->pageCacheSize = s - 1;
     319        else
     320            _private->pageCacheSize = s - 2;
    320321
    321322#ifndef NDEBUG
     
    325326        }
    326327#endif
    327 
    328         _private->pageCacheSize = s * multiplier;
    329328    }
    330329   
  • trunk/WebKit/WebView.subproj/WebPreferences.m

    r10215 r10476  
    213213        @"13",                          WebKitDefaultFixedFontSizePreferenceKey,
    214214        @"ISO-8859-1",                  WebKitDefaultTextEncodingNamePreferenceKey,
    215         @"4",                           WebKitPageCacheSizePreferenceKey,
     215        @"3",                           WebKitPageCacheSizePreferenceKey,
    216216        @"8388608",                     WebKitObjectCacheSizePreferenceKey,
    217217        [NSNumber numberWithBool:NO],   WebKitUserStyleSheetEnabledPreferenceKey,
Note: See TracChangeset for help on using the changeset viewer.