{"action":"created","issue":{"url":"https://api.github.com/repos/mprpic/dhprimes.xyz/issues/1","repository_url":"https://api.github.com/repos/mprpic/dhprimes.xyz","labels_url":"https://api.github.com/repos/mprpic/dhprimes.xyz/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mprpic/dhprimes.xyz/issues/1/comments","events_url":"https://api.github.com/repos/mprpic/dhprimes.xyz/issues/1/events","html_url":"https://github.com/mprpic/dhprimes.xyz/pull/1","id":135735351,"number":1,"title":"Some refactoring and marginal optimization","user":{"login":"skontar","id":10827040,"avatar_url":"https://avatars.githubusercontent.com/u/10827040?v=3","gravatar_id":"","url":"https://api.github.com/users/skontar","html_url":"https://github.com/skontar","followers_url":"https://api.github.com/users/skontar/followers","following_url":"https://api.github.com/users/skontar/following{/other_user}","gists_url":"https://api.github.com/users/skontar/gists{/gist_id}","starred_url":"https://api.github.com/users/skontar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skontar/subscriptions","organizations_url":"https://api.github.com/users/skontar/orgs","repos_url":"https://api.github.com/users/skontar/repos","events_url":"https://api.github.com/users/skontar/events{/privacy}","received_events_url":"https://api.github.com/users/skontar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-23T13:21:29Z","updated_at":"2016-02-26T17:06:26Z","closed_at":"2016-02-26T17:06:23Z","pull_request":{"url":"https://api.github.com/repos/mprpic/dhprimes.xyz/pulls/1","html_url":"https://github.com/mprpic/dhprimes.xyz/pull/1","diff_url":"https://github.com/mprpic/dhprimes.xyz/pull/1.diff","patch_url":"https://github.com/mprpic/dhprimes.xyz/pull/1.patch"},"body":"So I went through and did some cleanup, a bit of PEP8 and PyLint, removed unused variables etc. I have also profiled the code and achieved laughable level of optimization. We can talk about it later.\r\n\r\nFor reference, here is part of the profiler output:\r\n\r\n```\r\n         267054646 function calls (258574318 primitive calls) in 229.455 seconds\r\n\r\n   Ordered by: cumulative time\r\n\r\n   ncalls  tottime  percall  cumtime  percall filename:lineno(function)\r\n     96/1    0.010    0.000  229.455  229.455 {built-in method exec}\r\n        1    0.011    0.011  229.455  229.455 prime_db.py:3(<module>)\r\n        1    0.873    0.873  229.333  229.333 prime_db.py:148(main)\r\n   430024    9.095    0.000  169.602    0.000 prime_db.py:139(parse_file)\r\n   409222    7.527    0.000  142.018    0.000 prime_db.py:88(parse_openssl_file)\r\n1267666/419222   12.296    0.000   97.870    0.000 decoder.py:609(__call__)\r\n   419222    3.239    0.000   91.963    0.000 decoder.py:333(valueDecoder)\r\n   848444   47.629    0.000   65.735    0.000 decoder.py:90(valueDecoder)\r\n     2995    0.083    0.000   54.729    0.018 peewee.py:2972(execute)\r\n     2995    0.014    0.000   54.645    0.018 peewee.py:2468(_execute)\r\n     2995    0.400    0.000   48.784    0.016 peewee.py:2953(sql)\r\n     2995    5.250    0.002   48.310    0.016 peewee.py:1741(generate_insert)\r\n  2086111   22.083    0.000   22.083    0.000 {method 'search' of '_sre.SRE_Pattern' objects}\r\n     2995    0.011    0.000   20.090    0.007 peewee.py:1600(build_query)\r\n3392748/2996    2.714    0.000   20.073    0.007 peewee.py:1561(parse_node)\r\n3392748/2996    2.920    0.000   20.067    0.007 peewee.py:1531(_parse)\r\n428217/2996    0.622    0.000   20.057    0.007 peewee.py:1463(_parse_clause)\r\n428217/2996    2.845    0.000   20.045    0.007 peewee.py:1575(parse_node_list)\r\n   429233   10.705    0.000   10.705    0.000 {method 'sub' of '_sre.SRE_Pattern' objects}\r\n   422217    5.013    0.000   10.180    0.000 peewee.py:2892(_iter_rows)\r\n   430025    8.370    0.000    9.841    0.000 {built-in method open}\r\n   848444    1.697    0.000    9.696    0.000 decoder.py:19(_createComponent)\r\n  2934554    1.677    0.000    8.850    0.000 peewee.py:1451(_parse_param)\r\n127384939    8.738    0.000    8.738    0.000 octets.py:17(<lambda>)\r\n  2934554    7.600    0.000    8.611    0.000 peewee.py:590(__init__)\r\n  2934554    1.054    0.000    7.173    0.000 peewee.py:868(db_value)\r\n   848444    1.118    0.000    6.996    0.000 univ.py:113(clone)\r\n```"},"comment":{"url":"https://api.github.com/repos/mprpic/dhprimes.xyz/issues/comments/189374749","html_url":"https://github.com/mprpic/dhprimes.xyz/pull/1#issuecomment-189374749","issue_url":"https://api.github.com/repos/mprpic/dhprimes.xyz/issues/1","id":189374749,"user":{"login":"mprpic","id":493157,"avatar_url":"https://avatars.githubusercontent.com/u/493157?v=3","gravatar_id":"","url":"https://api.github.com/users/mprpic","html_url":"https://github.com/mprpic","followers_url":"https://api.github.com/users/mprpic/followers","following_url":"https://api.github.com/users/mprpic/following{/other_user}","gists_url":"https://api.github.com/users/mprpic/gists{/gist_id}","starred_url":"https://api.github.com/users/mprpic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mprpic/subscriptions","organizations_url":"https://api.github.com/users/mprpic/orgs","repos_url":"https://api.github.com/users/mprpic/repos","events_url":"https://api.github.com/users/mprpic/events{/privacy}","received_events_url":"https://api.github.com/users/mprpic/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T17:06:26Z","updated_at":"2016-02-26T17:06:26Z","body":"Awesome changes, thank you!"}}