Commit by: vajda
Modified files:
chandler/repository/persistence/DBRepository.py 1.3 1.4

Log message:
added code to setup a 64 Mb cache on Linux as well

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/repository/persistence/DBRepository.py.diff?r1=text&tr1=1.3&r2=text&tr2=1.4

Index: chandler/repository/persistence/DBRepository.py
diff -u chandler/repository/persistence/DBRepository.py:1.3 
chandler/repository/persistence/DBRepository.py:1.4
--- chandler/repository/persistence/DBRepository.py:1.3 Thu Jan 13 17:13:37 2005
+++ chandler/repository/persistence/DBRepository.py     Tue Jan 25 13:25:16 2005
@@ -1,6 +1,6 @@
 
-__revision__  = "$Revision: 1.3 $"
-__date__      = "$Date: 2005/01/14 01:13:37 $"
+__revision__  = "$Revision: 1.4 $"
+__date__      = "$Date: 2005/01/25 21:25:16 $"
 __copyright__ = "Copyright (c) 2003-2004 Open Source Applications Foundation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm";
 
@@ -125,9 +125,19 @@
         env.set_lk_max_locks(32767)
         env.set_lk_max_objects(32767)
 
-        # create a 64Mb cache on Windows
+        #
+        # create a 64Mb cache on Windows and Linux
+        #
+
         if os.name == 'nt':
-            env.set_cachesize(0, 67108864, 1)
+            env.set_cachesize(0, 0x4000000, 1)
+
+        elif os.name == 'posix':
+            from commands import getstatusoutput
+
+            status, name = getstatusoutput('uname')
+            if status == 0 and name == 'Linux':
+                env.set_cachesize(0, 0x4000000, 1)
 
         return env
 

_______________________________________________
Commits mailing list
Commits@osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to