Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-4207

Speed up tmpfile creation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • trunk
    • ---
    • libsvn_subr
    • None

    Description

      (I've tried to send this patch to dev@, and user@ several weeks ago. None of
      them seem to have made it to the lists. My best guess is they've ended up in
      some moderator's /dev/null.)
      
      Analyzing performance problems during the svn checkout of a project containing
      several large directories--one with more than 1500 entries--, we've discovered
      that libsvn_subr/io.c::svn_io_open_uniquely_named() is the culprit: When
      creating temporary files in the prop-base subdirectory, the current
      implementation leads to a high number of open() calls, proportional to the
      square of the number of entries per directory. Most of these open() calls fail
      with EEXIST.
      
      Using a different scheme that essentially remembers (part of) the
      last created temporary filename, most of these unsuccessful calls can be
      avoided. (For the project in question, this reduced the total amount of
      syscalls per checkout by almost 50 per cent, and significantly improved
      checkout speed, especially on NFS filesystems where open() is relatively
      expensive.)
      

      Original issue reported by dkobras

      Attachments

        1. 1_subversion-tempfile-speedup.patch
          3 kB
          Subversion Importer

        Issue Links

          Activity

            People

              Unassigned Unassigned
              subversion-importer Subversion Importer
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: