21541: Code cleanups
[arvados.git] / services / fuse / arvados_fuse / fusedir.py
index dbb7bb83f7b2e61750b243e83b4ea78d2087d412..9c78805107358dadf8b2f87221154753399b2c63 100644 (file)
@@ -218,7 +218,7 @@ class Directory(FreshBase):
 
     def clear(self):
         """Delete all entries"""
-        if len(self._entries) == 0:
+        if not self._entries:
             return
         oldentries = self._entries
         self._entries = {}
@@ -645,9 +645,10 @@ class CollectionDirectory(CollectionDirectoryBase):
 
     def objsize(self):
         # This is a rough guess of the amount of overhead involved for
-        # a collection; the calculation is each file averages 128
-        # bytes in the manifest, but consume 1024 bytes when blown up
-        # into Python data structures.
+        # a collection; the assumptions are that that each file
+        # averages 128 bytes in the manifest, but consume 1024 bytes
+        # of Python data structures, so 1024/128=8 means we estimate
+        # the RAM footprint at 8 times the size of bare manifest text.
         return self._manifest_size * 8
 
     def finalize(self):