1. 13 8月, 2008 2 次提交
    • M
      git-svn: Make it incrementally faster by minimizing temp files · 0b19138b
      Marcus Griep 提交于
      Currently, git-svn would create a temp file on four occasions:
      1. Reading a blob out of the object db
      2. Creating a delta from svn
      3. Hashing and writing a blob into the object db
      4. Reading a blob out of the object db (in another place in code)
      
      Any time git-svn did the above, it would dutifully create and then
      delete said temp file.  Unfortunately, this means that between 2-4
      temporary files are created/deleted per file 'add/modify'-ed in
      svn (O(n)).  This causes significant overhead and helps the inode
      counter to spin beautifully.
      
      By its nature, git-svn is a serial beast.  Thus, reusing a temp file
      does not pose significant problems.  "truncate and seek" takes much
      less time than "unlink and create".  This patch centralizes the
      tempfile creation and holds onto the tempfile until they are deleted
      on exit.  This significantly reduces file overhead, now requiring
      at most three (3) temp files per run (O(1)).
      Signed-off-by: NMarcus Griep <marcus@griep.us>
      Acked-by: NEric Wong <normalperson@yhbt.net>
      0b19138b
    • M
      Git.pm: Add faculties to allow temp files to be cached · e41352b2
      Marcus Griep 提交于
      This patch offers a generic interface to allow temp files to be
      cached while using an instance of the 'Git' package. If many
      temp files are created and destroyed during the execution of a
      program, this caching mechanism can help reduce the amount of
      files created and destroyed by the filesystem.
      
      The temp_acquire method provides a weak guarantee that a temp
      file will not be stolen by subsequent requests. If a file is
      locked when another acquire request is made, a simple error is
      thrown.
      Signed-off-by: NMarcus Griep <marcus@griep.us>
      Acked-by: NEric Wong <normalperson@yhbt.net>
      e41352b2
  2. 12 8月, 2008 8 次提交
  3. 11 8月, 2008 5 次提交
  4. 10 8月, 2008 1 次提交
  5. 09 8月, 2008 14 次提交
  6. 08 8月, 2008 7 次提交
  7. 07 8月, 2008 3 次提交