⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 184041 in webkit


Ignore:
Timestamp:
May 9, 2015, 10:37:16 AM (11 years ago)
Author:
Chris Dumez
Message:

Invalidate the FontCache on WebProcess suspension / critical memory pressure
https://bugs.webkit.org/show_bug.cgi?id=144821

Reviewed by Antti Koivisto.

Invalidate the FontCache on WebProcess suspension / critical memory
pressure to free a bit more memory (an extra 4-16Kb per WebProcess on
the pages I tested). We already purge inactive font data on
non-critical memory warning but invalidating the whole FontCache takes
care of clearing the FontCascade cache and the fontPlatformData cache
as well.

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::releaseCriticalMemory):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r184040 r184041  
     12015-05-09  Chris Dumez  <cdumez@apple.com>
     2
     3        Invalidate the FontCache on WebProcess suspension / critical memory pressure
     4        https://bugs.webkit.org/show_bug.cgi?id=144821
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Invalidate the FontCache on WebProcess suspension / critical memory
     9        pressure to free a bit more memory (an extra 4-16Kb per WebProcess on
     10        the pages I tested). We already purge inactive font data on
     11        non-critical memory warning but invalidating the whole FontCache takes
     12        care of clearing the FontCascade cache and the fontPlatformData cache
     13        as well.
     14
     15        * platform/MemoryPressureHandler.cpp:
     16        (WebCore::MemoryPressureHandler::releaseCriticalMemory):
     17
    1182015-05-09  Yoav Weiss  <yoav@yoav.ws>
    219
  • trunk/Source/WebCore/platform/MemoryPressureHandler.cpp

    r183746 r184041  
    130130        gcController().discardAllCompiledCode();
    131131    }
     132
     133    {
     134        ReliefLogger log("Invalidate font cache");
     135        FontCache::singleton().invalidate();
     136    }
    132137}
    133138
Note: See TracChangeset for help on using the changeset viewer.