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

svn_subst_translate_stream() should read bigger chunks

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • all
    • 0.24
    • libsvn_subr
    • None

    Description

      In this message
      
         http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=35002
      
      Ben Collins-Sussman described how adding eol translation to his tiny &
      speedy export editor slowed it back down to almost exactly the same
      speed as a regular checkout.  Since the only change he made was to add
      translation, it seems likely (ahem) that the cause is
      svn_subst_translate_stream(), which reads data in one byte at a time:
      
        while (err == SVN_NO_ERROR)
          {
            /* Read a byte from SRC */
            readlen = 1;
            read_err = svn_stream_read (s, &c, &readlen);
            [...]
          }
      
      This implies that the translation step is by far our costliest
      bottleneck in many working copy operations (and that reading & writing
      the various .svn/* files may not be as much of a problem as we thought.)
      
      This also explains why we've been seeing checkouts and updates slow
      down over time -- we've been adding eol properties to more and more
      files in the Subversion tree.
      
      There is no reason we can't read much bigger blocks in that loop. 
      Assigning to self, I want to see this happen real bad... :-)
      

      Attachments

        Activity

          People

            kfogel Karl Fogel
            kfogel Karl Fogel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: