{"action":"created","issue":{"url":"https://api.github.com/repos/udger/udger-java/issues/1","repository_url":"https://api.github.com/repos/udger/udger-java","labels_url":"https://api.github.com/repos/udger/udger-java/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/udger/udger-java/issues/1/comments","events_url":"https://api.github.com/repos/udger/udger-java/issues/1/events","html_url":"https://github.com/udger/udger-java/pull/1","id":164486870,"number":1,"title":"Fix performance problem by properly closing PreparedStatement","user":{"login":"mgandin","id":960941,"avatar_url":"https://avatars.githubusercontent.com/u/960941?v=3","gravatar_id":"","url":"https://api.github.com/users/mgandin","html_url":"https://github.com/mgandin","followers_url":"https://api.github.com/users/mgandin/followers","following_url":"https://api.github.com/users/mgandin/following{/other_user}","gists_url":"https://api.github.com/users/mgandin/gists{/gist_id}","starred_url":"https://api.github.com/users/mgandin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgandin/subscriptions","organizations_url":"https://api.github.com/users/mgandin/orgs","repos_url":"https://api.github.com/users/mgandin/repos","events_url":"https://api.github.com/users/mgandin/events{/privacy}","received_events_url":"https://api.github.com/users/mgandin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-08T08:54:51Z","updated_at":"2016-07-12T09:35:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/udger/udger-java/pulls/1","html_url":"https://github.com/udger/udger-java/pull/1","diff_url":"https://github.com/udger/udger-java/pull/1.diff","patch_url":"https://github.com/udger/udger-java/pull/1.patch"},"body":"Hello,\r\n\r\nWe are actually planning to replace an open-source user-agent parser with udger-java in our codebase for lesfurets.com (a french web insurance comparator) .\r\n\r\nWe have saw some improvements to gain some performance in parsing. We have just fix your code with closing PreparedStatements (for 5000 user-agents, the run longs from 230 seconds to 80 seconds after optimizations).\r\n\r\nWe have keep a manually preparedstatements closing, if you plan to be compatible with java >= Java 7, the code can be improved with try-with-resources."},"comment":{"url":"https://api.github.com/repos/udger/udger-java/issues/comments/231988277","html_url":"https://github.com/udger/udger-java/pull/1#issuecomment-231988277","issue_url":"https://api.github.com/repos/udger/udger-java/issues/1","id":231988277,"user":{"login":"mgandin","id":960941,"avatar_url":"https://avatars.githubusercontent.com/u/960941?v=3","gravatar_id":"","url":"https://api.github.com/users/mgandin","html_url":"https://github.com/mgandin","followers_url":"https://api.github.com/users/mgandin/followers","following_url":"https://api.github.com/users/mgandin/following{/other_user}","gists_url":"https://api.github.com/users/mgandin/gists{/gist_id}","starred_url":"https://api.github.com/users/mgandin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgandin/subscriptions","organizations_url":"https://api.github.com/users/mgandin/orgs","repos_url":"https://api.github.com/users/mgandin/repos","events_url":"https://api.github.com/users/mgandin/events{/privacy}","received_events_url":"https://api.github.com/users/mgandin/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T09:35:03Z","updated_at":"2016-07-12T09:35:03Z","body":"Well, here are the results on your master branch, without closing preparedstatements : \r\n`````\r\n### Test : 1\r\nTOTAL Queries: 1300 time : 12088ms AVG : 107.540855/s\r\n### Test : 2\r\nTOTAL Queries: 1300 time : 10122ms AVG : 128.4216/s\r\n### Test : 3\r\nTOTAL Queries: 1300 time : 10182ms AVG : 127.66848/s\r\n### Test : 4\r\nTOTAL Queries: 1300 time : 10277ms AVG : 126.494385/s\r\n### Test : 5\r\nTOTAL Queries: 1300 time : 10205ms AVG : 127.38068/s\r\n### Test : 6\r\nTOTAL Queries: 1300 time : 9994ms AVG : 130.07042/s\r\n### Test : 7\r\nTOTAL Queries: 1300 time : 10316ms AVG : 126.00778/s\r\n### Test : 8\r\nTOTAL Queries: 1300 time : 9780ms AVG : 132.9123/s\r\n### Test : 9\r\nTOTAL Queries: 1300 time : 10025ms AVG : 129.67303/s\r\n### Test : 10\r\nTOTAL Queries: 1300 time : 10717ms AVG : 121.30001/s\r\n### Test : 11\r\nTOTAL Queries: 1300 time : 10610ms AVG : 122.51806/s\r\n### Test : 12\r\nTOTAL Queries: 1300 time : 9385ms AVG : 138.51202/s\r\n### Test : 13\r\nTOTAL Queries: 1300 time : 10241ms AVG : 126.93477/s\r\n### Test : 14\r\nTOTAL Queries: 1300 time : 9499ms AVG : 136.847/s\r\n### Test : 15\r\nTOTAL Queries: 1300 time : 9265ms AVG : 140.30939/s\r\n### Test : 16\r\nTOTAL Queries: 1300 time : 9625ms AVG : 135.06355/s\r\n### Test : 17\r\nTOTAL Queries: 1300 time : 10367ms AVG : 125.39357/s\r\n### Test : 18\r\nTOTAL Queries: 1300 time : 10832ms AVG : 120.00782/s\r\n### Test : 19\r\nTOTAL Queries: 1300 time : 10054ms AVG : 129.29706/s\r\n### Test : 20\r\nTOTAL Queries: 1300 time : 9453ms AVG : 137.52075/s\r\n``````\r\n\r\nAnd here are the results with my commit closing preparedstatements : \r\n`````` \r\n### Test : 1\r\nTOTAL Queries: 1300 time : 7027ms AVG : 184.98999/s\r\n### Test : 2\r\nTOTAL Queries: 1300 time : 6331ms AVG : 205.3244/s\r\n### Test : 3\r\nTOTAL Queries: 1300 time : 5976ms AVG : 217.51668/s\r\n### Test : 4\r\nTOTAL Queries: 1300 time : 6071ms AVG : 214.13017/s\r\n### Test : 5\r\nTOTAL Queries: 1300 time : 6311ms AVG : 205.9724/s\r\n### Test : 6\r\nTOTAL Queries: 1300 time : 6145ms AVG : 211.54456/s\r\n### Test : 7\r\nTOTAL Queries: 1300 time : 6060ms AVG : 214.49524/s\r\n### Test : 8\r\nTOTAL Queries: 1300 time : 5679ms AVG : 228.90688/s\r\n### Test : 9\r\nTOTAL Queries: 1300 time : 5611ms AVG : 231.68742/s\r\n### Test : 10\r\nTOTAL Queries: 1300 time : 5843ms AVG : 222.46349/s\r\n### Test : 11\r\nTOTAL Queries: 1300 time : 5936ms AVG : 218.99493/s\r\n### Test : 12\r\nTOTAL Queries: 1300 time : 6132ms AVG : 211.99379/s\r\n### Test : 13\r\nTOTAL Queries: 1300 time : 6075ms AVG : 213.99167/s\r\n### Test : 14\r\nTOTAL Queries: 1300 time : 6145ms AVG : 211.53203/s\r\n### Test : 15\r\nTOTAL Queries: 1300 time : 5965ms AVG : 217.92119/s\r\n### Test : 16\r\nTOTAL Queries: 1300 time : 6282ms AVG : 206.91429/s\r\n### Test : 17\r\nTOTAL Queries: 1300 time : 6643ms AVG : 195.69356/s\r\n### Test : 18\r\nTOTAL Queries: 1300 time : 5490ms AVG : 236.78676/s\r\n### Test : 19\r\nTOTAL Queries: 1300 time : 6625ms AVG : 196.19994/s\r\n### Test : 20\r\nTOTAL Queries: 1300 time : 6289ms AVG : 206.71004/s\r\n```````\r\n\r\nIt's faster ;-) !"}}
{"actor":{"display_login":"mgandin"}}