Changeset 1895 for inundation/caching
- Timestamp:
- Oct 11, 2005, 5:00:44 PM (19 years ago)
- Location:
- inundation/caching
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/caching/DOC.txt
r130 r1895 95 95 disables compression. (Default: compression=1). If the requested compressed 96 96 or uncompressed file is not there, it'll try the other version. 97 98 Sometimes compression==1 can cause a MemoryException. 99 In that case try the uncompressed version. 97 100 98 101 Forced evaluation: -
inundation/caching/caching.py
r1831 r1895 1254 1254 1255 1255 1256 Ts = pickler.dumps(T,bin) 1257 TsC = zlib.compress(Ts,comp_level) 1258 file.write(TsC) 1256 try: 1257 Ts = pickler.dumps(T,bin) 1258 except MemoryError: 1259 msg = '****WARNING (caching.py): Could not pickle data for compression.' 1260 msg += ' Try using compression = False' 1261 raise MemoryError, msg 1262 else: 1263 #Compressed pickling 1264 TsC = zlib.compress(Ts,comp_level) 1265 file.write(TsC) 1259 1266 else: 1260 pickler.dump(T,file,bin) 1267 #Uncompressed pickling 1268 pickler.dump(T,file,bin) 1269 1270 1261 1271 1262 1272 # -----------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.