Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-19423

Implement "pretty" according to spec to save precious bytes on the wire.

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Critical
    • None
    • 4.0.0, 4.1.0, 4.5.0
    • query

    Description

      Hi folks,

      while working on performance related topics (YCSB) I noted that the pretty=false option is specified in the spec but if you actually set it you get:

      {
          "requestID": "c0d86b99-500d-42b7-8406-954ba619b851",
          "errors": [
              {
                  "code": 1020,
                  "msg": "false pretty not yet implemented"
              }
          ],
          "status": "fatal",
          "metrics": {
              "elapsedTime": "50.975µs",
              "executionTime": "50.741µs",
              "resultCount": 0,
              "resultSize": 0,
              "errorCount": 1
      

      It would be awesome if we can have this, I hope its not much work and it would help us cut down quite massively on the response sizes. Consider just the following

      {
          "requestID": "c0700e9d-01df-406e-aa06-f859d1e3ac3a",
          "signature": {
              "id": "json"
          },
          "results": [
              {
                  "id": "21st_amendment_brewery_cafe"
              },
              {
                  "id": "21st_amendment_brewery_cafe-21a_ipa"
              },
              {
                  "id": "21st_amendment_brewery_cafe-563_stout"
              },
              {
                  "id": "21st_amendment_brewery_cafe-amendment_pale_ale"
              },
              {
                  "id": "21st_amendment_brewery_cafe-bitter_american"
              },
              {
                  "id": "21st_amendment_brewery_cafe-double_trouble_ipa"
              },
              {
                  "id": "21st_amendment_brewery_cafe-general_pippo_s_porter"
              },
              {
                  "id": "21st_amendment_brewery_cafe-north_star_red"
              },
              {
                  "id": "21st_amendment_brewery_cafe-oyster_point_oyster_stout"
              },
              {
                  "id": "21st_amendment_brewery_cafe-potrero_esb"
              }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "8.585483ms",
              "executionTime": "8.550443ms",
              "resultCount": 10,
              "resultSize": 738
          }
      }
      

      vs.

      {"requestID":"c0700e9d-01df-406e-aa06-f859d1e3ac3a","signature":{"id":"json"},"results":[{"id":"21st_amendment_brewery_cafe"},{"id":"21st_amendment_brewery_cafe-21a_ipa"},{"id":"21st_amendment_brewery_cafe-563_stout"},{"id":"21st_amendment_brewery_cafe-amendment_pale_ale"},{"id":"21st_amendment_brewery_cafe-bitter_american"},{"id":"21st_amendment_brewery_cafe-double_trouble_ipa"},{"id":"21st_amendment_brewery_cafe-general_pippo_s_porter"},{"id":"21st_amendment_brewery_cafe-north_star_red"},{"id":"21st_amendment_brewery_cafe-oyster_point_oyster_stout"},{"id":"21st_amendment_brewery_cafe-potrero_esb"}],"status":"success","metrics":{"elapsedTime":"8.585483ms","executionTime":"8.550443ms","resultCount":10,"resultSize":738}}
      

      Goes down from 1145 to 729 bytes, thats like 40% or so?

      Attachments

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

        Activity

          People

            Prerna.Manaktala Prerna Manaktala (Inactive)
            daschl Michael Nitschinger
            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