Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-421

Query.setLimit() performance problem

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 1.4.0-dp2
    • 1.3.2
    • Views
    • Security Level: Public
    • OSX 10.9.1, JDK 1.7.0_45-b18, Couchbase 2.1.1 CE

    Description

      I've encounter a substantial slowdown in my code when using a view in combination with a query. It seems that setting the limit (other setters have not been tried, but are likely to show similar behaviour) will eventually call net.spy.memcached.util.StringUtils#isJsonObject(). In 2.10.5 and earlier, this method will use 'new Integer()/catch NumberFormatException' to test if the passed argument can be parsed to an Integer object. However, the number of thrown and caught exceptions was severely limiting performance on my setup.

      Removing the setLimit() call on my Query object resulted in a threefold increase in performance (from 600 to 1900 rps).

      Original SpyMemcached issue: http://code.google.com/p/spymemcached/issues/detail?id=298

      Attachments

        Issue Links

          For Gerrit Dashboard: JCBC-421
          # Subject Branch Project Status CR V

          Activity

            People

              daschl Michael Nitschinger
              pluppens Philip Luppens
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty