Revision: 4627
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4627&view=rev
Author:   mdboom
Date:     2007-12-05 10:57:06 -0800 (Wed, 05 Dec 2007)

Log Message:
-----------
Prevent mathtext cache from getting out of hand.

Modified Paths:
--------------
    branches/transforms/lib/matplotlib/mathtext.py

Modified: branches/transforms/lib/matplotlib/mathtext.py
===================================================================
--- branches/transforms/lib/matplotlib/mathtext.py      2007-12-05 18:56:42 UTC 
(rev 4626)
+++ branches/transforms/lib/matplotlib/mathtext.py      2007-12-05 18:57:06 UTC 
(rev 4627)
@@ -151,7 +151,7 @@
 
 from matplotlib.afm import AFM
 from matplotlib.cbook import Bunch, get_realpath_and_stat, \
-    is_string_like
+    is_string_like, maxdict
 from matplotlib.ft2font import FT2Font, FT2Image, KERNING_DEFAULT, 
LOAD_FORCE_AUTOHINT, LOAD_NO_HINTING
 from matplotlib.font_manager import findfont, FontProperties
 from matplotlib._mathtext_data import latex_to_bakoma, \
@@ -2656,7 +2656,7 @@
 
     def __init__(self, output):
         self._output = output
-        self._cache = {}
+        self._cache = maxdict(50)
 
     def parse(self, s, dpi = 72, prop = None):
         if prop is None:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to