mutable: increase max segsize to 3.5MB, to allow dirnodes with about 10k entries

This commit is contained in:
Brian Warner 2008-03-10 20:39:55 -07:00
parent 073d8c9465
commit 2464899f9a

View File

@ -1362,7 +1362,17 @@ class Publish:
started = now
# now apply FEC
self.MAX_SEGMENT_SIZE = 1024*1024
# we limit the segment size as usual to constrain our memory
# footprint. The max segsize is higher for mutable files, because we
# want to support dirnodes with up to 10k children, and each child
# uses about 330 bytes. If you actually put that much into a
# directory you'll be using a footprint of around 14MB, which is
# higher than we'd like, but it is more important right now to
# support large directories than to make memory usage small when you
# use them. Once we implement MDMF (with multiple segments), we will
# drop this back down, probably to 128KiB.
self.MAX_SEGMENT_SIZE = 3500000
data_length = len(crypttext)
segment_size = min(self.MAX_SEGMENT_SIZE, len(crypttext))