Commits

Brodie Rao committed 41acb0a

Refreshing queue

  • Participants
  • Parent commits b38b048

Comments (0)

Files changed (3)

File bigger-revlog-cache

+# HG changeset patch
+# Parent 1b0541854536be5c429e7e48ca37b6b4aa423028
+revlog: increase chunk cache size from 64 KB to 128 KB
+
+diff --git a/mercurial/revlog.py b/mercurial/revlog.py
+--- a/mercurial/revlog.py
++++ b/mercurial/revlog.py
+@@ -820,11 +820,11 @@ class revlog(object):
+         else:
+             df = self.opener(self.datafile)
+ 
+-        realoffset = offset - offset % 65536
+-        if offset + length > realoffset + 65536:
++        realoffset = offset - offset % 131072
++        if offset + length > realoffset + 131072:
++            reallength = 262144
++        else:
+             reallength = 131072
+-        else:
+-            reallength = 65536
+         df.seek(realoffset)
+         d = df.read(reallength)
+         df.close()

File chunked-revlog-cache

 +        df.seek(realoffset)
 +        d = df.read(reallength)
          df.close()
-         self._addchunk(offset, d)
+-        self._addchunk(offset, d)
 -        if readahead > length:
 -            return util.buffer(d, 0, length)
++        self._addchunk(realoffset, d)
 +        if offset != realoffset or reallength != length:
-+            return util.buffer(d, realoffset - offset, length)
++            return util.buffer(d, offset - realoffset, length)
          return d
  
      def _getchunk(self, offset, length):
 cache-fps
 chunked-revlog-cache
+bigger-revlog-cache
 branch-cache-doc
 branches-reduce-reads
 branch-cache