[Zope3-checkins] SVN: Zope3/trunk/src/ZEO/tests/test_cache.py Merge
rev 29194 from ZODB 3.3 branch.
Tim Peters
tim.one at comcast.net
Thu Feb 17 16:22:58 EST 2005
Log message for revision 29196:
Merge rev 29194 from ZODB 3.3 branch.
This can be ignored next time a new ZODB is stitched into
Zope3. This fixes a gross boost in process highwater mark
when running the tests. After this, running the ZODB/ZEO
--all tests hits a highwater mark of 35MB on WinXP, in one
test, and hovers in the low-to-mid 20s before and after.
Other platforms may or may not behave better or worse.
The highwater mark on these tests was well over 200MB before
this patch.
setUp(): Use a much smaller (than default) ZEO client cache.
The current default is 200MB, and at least testSerialization reads
the entire cache file into one giant string. That grossly boosts
the process highwater mark when running the tests. Windows reclaims
the memory after, but other platforms may not.
Cool: testSerialization was one of the slowest tests before, but
is 100x faster now.
Changed:
U Zope3/trunk/src/ZEO/tests/test_cache.py
-=-
Modified: Zope3/trunk/src/ZEO/tests/test_cache.py
===================================================================
--- Zope3/trunk/src/ZEO/tests/test_cache.py 2005-02-17 21:17:43 UTC (rev 29195)
+++ Zope3/trunk/src/ZEO/tests/test_cache.py 2005-02-17 21:22:58 UTC (rev 29196)
@@ -29,7 +29,10 @@
class CacheTests(unittest.TestCase):
def setUp(self):
- self.cache = ZEO.cache.ClientCache()
+ # The default cache size is much larger than we need here. Since
+ # testSerialization reads the entire file into a string, it's not
+ # good to leave it that big.
+ self.cache = ZEO.cache.ClientCache(size=1024**2)
self.cache.open()
def tearDown(self):
More information about the Zope3-Checkins
mailing list