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

svn_fs_paths_changed() does the same work over and over

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • ---
    • unscheduled
    • libsvn_fs_base
    • None

    Description

      If you look at libsvn_fs_base/bdb/changes-table.c, there's an big inefficiency.
      Every time svn_fs_paths_changed() is called, we are reading all of the original
      changed-path events out of a single BDB key, then collapsing them into a
      canonical list of changes.  We do this on *every single* call to the public API
      -- what a waste of server CPU!
      
      (By "collapse", I mean walking over the list and looking for delete or replace
      events, and then walking over the list *again* for each, to remove events that
      were nullified.  In a worst case scenario, this tends toward O(n^2) behavior.)
      
      Chatting with kfogel and cmpilato in IRC, they agreed that the canonical
      collapsing of events should happen exactly once, and then get stored in BDB that
      way.  It's not clear when this compression should happen;  perhaps in a
      post-commit situation, around the same time as deltification?
      
      In any case, this clearly hasn't been a problem in production for anyone, so
      I've marked it as low-priority.  It's one of those "clean up" things that ought
      to get done someday.
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sussman Ben Collins-Sussman
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: