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

Write simple JSON HTTP responses directly as raw bytes

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 2.8.0
    • None
    • SyncGateway
    • Security Level: Public
    • None
    • CBG Sprint 35
    • 2

    Description

      We're creating new bodies with a small set of fields that are used as responses via writeJSONStatus - We should be able to quite easily switch these to use raw bytes instead, to avoid the overhead of marshalling canonical JSON:
      https://github.com/couchbase/sync_gateway/blob/f15e5f992ffdb298d002d75fc15113d3247f59f2/rest/doc_api.go#L359

       

      We're doing similar in writeStatus:
      https://github.com/couchbase/sync_gateway/blob/69aed650fea96f3181036d5e110bbec225109284/rest/handler.go#L756-L757

       

      Spun out of: https://github.com/couchbase/sync_gateway/pull/4316

      Attachments

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

        Activity

          People

            jacques.rascagneres Jacques Rascagneres
            ben.brooks Ben Brooks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty