{"action":"created","issue":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/issues/801","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/issues/801/labels{/name}","comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/issues/801/comments","events_url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/issues/801/events","html_url":"https://github.com/couchbase/couchbase-lite-java-core/issues/801","id":114361449,"number":801,"title":"Replace JNI-based JSON collation with ICUC","user":{"login":"zgramana","id":759830,"avatar_url":"https://avatars.githubusercontent.com/u/759830?v=3","gravatar_id":"","url":"https://api.github.com/users/zgramana","html_url":"https://github.com/zgramana","followers_url":"https://api.github.com/users/zgramana/followers","following_url":"https://api.github.com/users/zgramana/following{/other_user}","gists_url":"https://api.github.com/users/zgramana/gists{/gist_id}","starred_url":"https://api.github.com/users/zgramana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zgramana/subscriptions","organizations_url":"https://api.github.com/users/zgramana/orgs","repos_url":"https://api.github.com/users/zgramana/repos","events_url":"https://api.github.com/users/zgramana/events{/privacy}","received_events_url":"https://api.github.com/users/zgramana/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/labels/customer","name":"customer","color":"006b75"},{"url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/labels/in%20progress","name":"in progress","color":"ededed"},{"url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/labels/performance","name":"performance","color":"bfdadc"},{"url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/labels/S2:%20critical","name":"S2: critical","color":"eb6420"},{"url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/labels/size-large","name":"size-large","color":"f7c6c7"}],"state":"open","locked":false,"assignee":{"login":"hideki","id":15889,"avatar_url":"https://avatars.githubusercontent.com/u/15889?v=3","gravatar_id":"","url":"https://api.github.com/users/hideki","html_url":"https://github.com/hideki","followers_url":"https://api.github.com/users/hideki/followers","following_url":"https://api.github.com/users/hideki/following{/other_user}","gists_url":"https://api.github.com/users/hideki/gists{/gist_id}","starred_url":"https://api.github.com/users/hideki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hideki/subscriptions","organizations_url":"https://api.github.com/users/hideki/orgs","repos_url":"https://api.github.com/users/hideki/repos","events_url":"https://api.github.com/users/hideki/events{/privacy}","received_events_url":"https://api.github.com/users/hideki/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/milestones/6","html_url":"https://github.com/couchbase/couchbase-lite-java-core/milestones/1.2.0","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/milestones/6/labels","id":771954,"number":6,"title":"1.2.0","description":"","creator":{"login":"jessliu","id":4998909,"avatar_url":"https://avatars.githubusercontent.com/u/4998909?v=3","gravatar_id":"","url":"https://api.github.com/users/jessliu","html_url":"https://github.com/jessliu","followers_url":"https://api.github.com/users/jessliu/followers","following_url":"https://api.github.com/users/jessliu/following{/other_user}","gists_url":"https://api.github.com/users/jessliu/gists{/gist_id}","starred_url":"https://api.github.com/users/jessliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessliu/subscriptions","organizations_url":"https://api.github.com/users/jessliu/orgs","repos_url":"https://api.github.com/users/jessliu/repos","events_url":"https://api.github.com/users/jessliu/events{/privacy}","received_events_url":"https://api.github.com/users/jessliu/received_events","type":"User","site_admin":false},"open_issues":41,"closed_issues":66,"state":"open","created_at":"2014-08-29T17:31:06Z","updated_at":"2015-10-31T02:57:20Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-10-30T21:45:55Z","updated_at":"2015-11-04T00:49:11Z","closed_at":null,"body":"Currently TDCollator will only handle ASCII chars on the C side, and delegates to Java for all other chars. This is very slow.\n\nInstead, replace the custom C + JNI/Java compare with the official Unicode UCIC library to handle all collation comparisons: http://userguide.icu-project.org/collation/api"},"comment":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/issues/comments/153535984","html_url":"https://github.com/couchbase/couchbase-lite-java-core/issues/801#issuecomment-153535984","issue_url":"https://api.github.com/repos/couchbase/couchbase-lite-java-core/issues/801","id":153535984,"user":{"login":"hideki","id":15889,"avatar_url":"https://avatars.githubusercontent.com/u/15889?v=3","gravatar_id":"","url":"https://api.github.com/users/hideki","html_url":"https://github.com/hideki","followers_url":"https://api.github.com/users/hideki/followers","following_url":"https://api.github.com/users/hideki/following{/other_user}","gists_url":"https://api.github.com/users/hideki/gists{/gist_id}","starred_url":"https://api.github.com/users/hideki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hideki/subscriptions","organizations_url":"https://api.github.com/users/hideki/orgs","repos_url":"https://api.github.com/users/hideki/repos","events_url":"https://api.github.com/users/hideki/events{/privacy}","received_events_url":"https://api.github.com/users/hideki/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T00:49:11Z","updated_at":"2015-11-04T00:49:11Z","body":"Test Result of updateIndex Performance Improvement by ICU4C\r\n\r\nTest tool is Test12_IndexView\r\nNumber of records: 10000\r\n\r\n| DEVICE | Java Collator | ICU4C | Improvement |\r\n| --- | --- | --- | --- |\r\n| NEXUS 9 | 4381.0ms | 3563.0ms | +22.96% |\r\n| NEXUS 6 | 11787.66ms | 8032.0ms  | +46.76% |\r\n| NEXUS 4 | 16911ms | 11297ms  | +49.69% |\r\n\r\n\r\nRaw result\r\n```\r\nformula to calculate improvement => (old value - new value)/new value\r\n\r\nNexus 9\r\n\r\nUse Java TextCollator through JNI\r\nIndexViewPerformance:testViewIndexPerformance,4763,10000\r\nIndexViewPerformance:testViewIndexPerformance,4233,10000\r\nIndexViewPerformance:testViewIndexPerformance,4147,10000\r\n\r\nAVE 4381.0\r\n\r\nUse ICU4C\r\nIndexViewPerformance:testViewIndexPerformance,3809,10000\r\nIndexViewPerformance:testViewIndexPerformance,3450,10000\r\nIndexViewPerformance:testViewIndexPerformance,3430,10000\r\n\r\nAVE 3563.0\r\n\r\n+22.96%\r\n\r\nNexus 6\r\n\r\nUse Java TextCollator through JNI\r\nIndexViewPerformance:testViewIndexPerformance,11868,10000\r\nIndexViewPerformance:testViewIndexPerformance,11721,10000\r\nIndexViewPerformance:testViewIndexPerformance,11774,10000\r\n\r\nAVE 11787.66\r\n\r\nUse ICU4C\r\nIndexViewPerformance:testViewIndexPerformance,8121,10000\r\nIndexViewPerformance:testViewIndexPerformance,8062,10000\r\nIndexViewPerformance:testViewIndexPerformance,7913,10000\r\n\r\nAVE 8032.0\r\n\r\n+46.76%\r\n\r\nNexus 4\r\n\r\nUse Java TextCollator through JNI\r\nIndexViewPerformance:testViewIndexPerformance,17068,10000\r\nIndexViewPerformance:testViewIndexPerformance,16955,10000\r\nIndexViewPerformance:testViewIndexPerformance,16710,10000\r\n\r\nAVE: 16911ms\r\n\r\nIndexViewPerformance:testViewIndexPerformance,11379,10000\r\nIndexViewPerformance:testViewIndexPerformance,11251,10000\r\nIndexViewPerformance:testViewIndexPerformance,11262,10000\r\n\r\nAVE: 11297ms\r\n\r\n+49.69\r\n```"}}