{"action":"created","issue":{"url":"https://api.github.com/repos/lift/framework/issues/1817","repository_url":"https://api.github.com/repos/lift/framework","labels_url":"https://api.github.com/repos/lift/framework/issues/1817/labels{/name}","comments_url":"https://api.github.com/repos/lift/framework/issues/1817/comments","events_url":"https://api.github.com/repos/lift/framework/issues/1817/events","html_url":"https://github.com/lift/framework/pull/1817","id":189832882,"number":1817,"title":"JZoom: 2x-10x lift-json performance improvements in some cases","user":{"login":"Shadowfiend","id":8245,"avatar_url":"https://avatars.githubusercontent.com/u/8245?v=3","gravatar_id":"","url":"https://api.github.com/users/Shadowfiend","html_url":"https://github.com/Shadowfiend","followers_url":"https://api.github.com/users/Shadowfiend/followers","following_url":"https://api.github.com/users/Shadowfiend/following{/other_user}","gists_url":"https://api.github.com/users/Shadowfiend/gists{/gist_id}","starred_url":"https://api.github.com/users/Shadowfiend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shadowfiend/subscriptions","organizations_url":"https://api.github.com/users/Shadowfiend/orgs","repos_url":"https://api.github.com/users/Shadowfiend/repos","events_url":"https://api.github.com/users/Shadowfiend/events{/privacy}","received_events_url":"https://api.github.com/users/Shadowfiend/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-16T20:24:16Z","updated_at":"2016-12-10T17:10:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/lift/framework/pulls/1817","html_url":"https://github.com/lift/framework/pull/1817","diff_url":"https://github.com/lift/framework/pull/1817.diff","patch_url":"https://github.com/lift/framework/pull/1817.patch"},"body":"At @elemica we've been using the jawn parser to produce the\r\nlift-json AST due to performance issues in the lift-json parser.\r\nI looked at this a little more deeply over the past few months as\r\nI'm loath to depend on additional libraries if it isn't necessary. The\r\nresult has been some work that improves lift-json's performance\r\n2x-10x in several of jawn's benchmarks, as well as an additional\r\none that involves some large JSON that we've seen at work, bringing\r\nus to the same general performance level as jawn. The benchmarks:\r\n\r\n```\r\nBenchmark                           Score      Error      Units        Score     Error\r\nBla25Bench.jawnStringParse         25.240 ±    2.339      ms/op       25.203 ±   3.041\r\nBla25Bench.liftParse               44.065 ±    1.594      ms/op       25.772 ±   2.963\r\n                                                                                       \r\nCountriesBench.jawnStringParse      3.854 ±    0.223      ms/op        4.050 ±   0.057\r\nCountriesBench.liftParse            7.122 ±    0.137      ms/op        7.247 ±   0.122\r\n                                                                                       \r\nFlipbookBench.jawnStringParse    1233.372 ±  605.274      ms/op     1187.654 ± 538.381\r\nFlipbookBench.liftParse         20308.247 ± 1467.681      ms/op     1267.820 ± 553.363\r\n                                                                                       \r\nQux2Bench.jawnStringParse          10.817 ±    0.203      ms/op       11.000 ±   0.353\r\nQux2Bench.liftParse                19.298 ±    0.516      ms/op       11.413 ±   0.171\r\n                                                                                       \r\nUgh10kBench.jawnStringParse       307.833 ±   24.139      ms/op      321.164 ±  38.761\r\nUgh10kBench.liftParse            2024.546 ±   89.060      ms/op      337.198 ±  14.643\r\n```\r\n\r\nOn the left is the original performance, on the right the performance\r\nwith this branch.\r\n\r\nThe main change here is that we aggressively use mutable state and\r\naggressively reuse data structures and objects wherever possible to\r\nminimize allocation overhead. Additionally, we rework some of the\r\nconditional logic to be compiled down to switch statements that can\r\nturn into jumps or table lookups in JVM bytecode.\r\n\r\nLastly, we drop the fix for the Java 6 double-parsing vulnerability, since\r\nLift 3 isn't built for Java 6, Java 7+ are patched, and Java 6 itself has\r\nalso been patched.\r\n\r\nThe changes are a bit gnarly, but ultimately 100% worth it."},"comment":{"url":"https://api.github.com/repos/lift/framework/issues/comments/266223256","html_url":"https://github.com/lift/framework/pull/1817#issuecomment-266223256","issue_url":"https://api.github.com/repos/lift/framework/issues/1817","id":266223256,"user":{"login":"farmdawgnation","id":620189,"avatar_url":"https://avatars.githubusercontent.com/u/620189?v=3","gravatar_id":"","url":"https://api.github.com/users/farmdawgnation","html_url":"https://github.com/farmdawgnation","followers_url":"https://api.github.com/users/farmdawgnation/followers","following_url":"https://api.github.com/users/farmdawgnation/following{/other_user}","gists_url":"https://api.github.com/users/farmdawgnation/gists{/gist_id}","starred_url":"https://api.github.com/users/farmdawgnation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farmdawgnation/subscriptions","organizations_url":"https://api.github.com/users/farmdawgnation/orgs","repos_url":"https://api.github.com/users/farmdawgnation/repos","events_url":"https://api.github.com/users/farmdawgnation/events{/privacy}","received_events_url":"https://api.github.com/users/farmdawgnation/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T17:10:24Z","updated_at":"2016-12-10T17:10:24Z","body":"Okay, I think I'm good on this! Shall we ship it?!?!?!?"}}
{"actor":{"display_login":"farmdawgnation"}}