Icon - increase LRU cache sizes
Some activities suffer from performance penalties once the number of icons backed by SVGs exceeds 50. Double the cache sizes. Tested on OLPC XO-1, the weakest known system on which Sugar is used.
This commit is contained in:
parent
a77ae5fb57
commit
aaea86066d
@ -113,7 +113,7 @@ _BADGE_SIZE = 0.45
|
|||||||
class _SVGLoader(object):
|
class _SVGLoader(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._cache = LRU(50)
|
self._cache = LRU(100)
|
||||||
|
|
||||||
def load(self, file_name, entities, cache):
|
def load(self, file_name, entities, cache):
|
||||||
if file_name in self._cache:
|
if file_name in self._cache:
|
||||||
@ -156,7 +156,7 @@ class _BadgeInfo(object):
|
|||||||
|
|
||||||
class _IconBuffer(object):
|
class _IconBuffer(object):
|
||||||
|
|
||||||
_surface_cache = LRU(50)
|
_surface_cache = LRU(100)
|
||||||
_loader = _SVGLoader()
|
_loader = _SVGLoader()
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user