Details
-
Improvement
-
Resolution: Fixed
-
Major
-
1.3.2
-
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
- is triggered by
-
SPY-127 Address performance of try/catch in isJSONObject checks
- Resolved
For Gerrit Dashboard: JCBC-421 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
33930,6 | JCBC-421: Rewriting the Query internals for better performance. | master | couchbase-java-client | Status: MERGED | +2 | +1 |