Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-247

Reduce CPU associated with large skipped sequence queue

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Critical
    • 2.5.0, 2.1.3
    • 2.1.2
    • SyncGateway
    • Security Level: Public
    • None
    • CBG Sprint 13
    • 5

    Description

      When the skipped sequence queue grows very large, the cost associated with removal from that queue becomes a performance bottleneck.  SkippedSequenceQueue.Remove does a sort.Search in the slice to find the value, then does a slice shift/copy to remove the element.  For large skipped sequence queues, the memory move associated with that shift becomes a performance bottleneck.

      The current slice-based queue should be replaced with a list+map - the map for direct access to elements by sequence, and the list for memory efficient removal from an ordered list.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            adamf Adam Fraser
            adamf Adam Fraser
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty