{"action":"closed","number":31,"pull_request":{"url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/pulls/31","id":210214407,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMjE0NDA3","html_url":"https://github.com/oxarbitrage/bitshares-explorer-api/pull/31","diff_url":"https://github.com/oxarbitrage/bitshares-explorer-api/pull/31.diff","patch_url":"https://github.com/oxarbitrage/bitshares-explorer-api/pull/31.patch","issue_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/issues/31","number":31,"state":"closed","locked":false,"title":"Polish and performances improvements.","user":{"login":"Zapata","id":490068,"node_id":"MDQ6VXNlcjQ5MDA2OA==","avatar_url":"https://avatars2.githubusercontent.com/u/490068?v=4","gravatar_id":"","url":"https://api.github.com/users/Zapata","html_url":"https://github.com/Zapata","followers_url":"https://api.github.com/users/Zapata/followers","following_url":"https://api.github.com/users/Zapata/following{/other_user}","gists_url":"https://api.github.com/users/Zapata/gists{/gist_id}","starred_url":"https://api.github.com/users/Zapata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zapata/subscriptions","organizations_url":"https://api.github.com/users/Zapata/orgs","repos_url":"https://api.github.com/users/Zapata/repos","events_url":"https://api.github.com/users/Zapata/events{/privacy}","received_events_url":"https://api.github.com/users/Zapata/received_events","type":"User","site_admin":false},"body":"This is the continuation of worked started at #25, #26.\r\n\r\nMain changes:\r\n\r\n- Optimization of /top_proxies (only one SQL query)\r\n- Optimization of /*_votes\r\n- Introduction of a caching mechanism.\r\n- Add an optional profiler dashboard.\r\n- Various code cleanup\r\n\r\n\r\nInstallation:\r\n\r\n  - Dependencies have changed so run `pip install -r requirements/production.pip`\r\n  - Review new configuration elements CACHE and PROFILER to fit your needs\r\n\r\nCache:\r\n \r\nThe default is to keep in memory the blockchain global properties and the top_* requests. The data is valid for 10 minutes, then it will be discarded and recomputed. This is safe as top_* data rely on the database data that is updated only hourly, and the global properties of the blockchain does not change often.\r\nThe cache could be easely deactivated with CACHE_TYPE = 'null'\r\nMore information [there](https://flask-caching.readthedocs.io/en/latest/#configuring-flask-caching).\r\n\r\nProfiler:\r\n \r\nA dashboard to track timing and counts of all the endpoints have been introduced. It uses [Flask-profiler](https://github.com/muatik/flask-profiler).\r\nBy default it is deactivated.\r\nNote that the alternative (better) [dashboard](https://github.com/muatik/flask-profiler#screenshots) has been considered, but requires updating to Python3.\r\n\r\nAdditional notes.\r\n \r\nNon regression testing has been run sucessfully.","created_at":"2018-08-22T17:53:09Z","updated_at":"2018-08-22T19:29:49Z","closed_at":"2018-08-22T19:29:49Z","merged_at":"2018-08-22T19:29:49Z","merge_commit_sha":"4eb3ae01d751edb63deb1944aada129ad0c82a47","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/pulls/31/commits","review_comments_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/pulls/31/comments","review_comment_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/issues/31/comments","statuses_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/statuses/043c74b454ab72a0a13fb318e510fa60e78be2d1","head":{"label":"Zapata:master","ref":"master","sha":"043c74b454ab72a0a13fb318e510fa60e78be2d1","user":{"login":"Zapata","id":490068,"node_id":"MDQ6VXNlcjQ5MDA2OA==","avatar_url":"https://avatars2.githubusercontent.com/u/490068?v=4","gravatar_id":"","url":"https://api.github.com/users/Zapata","html_url":"https://github.com/Zapata","followers_url":"https://api.github.com/users/Zapata/followers","following_url":"https://api.github.com/users/Zapata/following{/other_user}","gists_url":"https://api.github.com/users/Zapata/gists{/gist_id}","starred_url":"https://api.github.com/users/Zapata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zapata/subscriptions","organizations_url":"https://api.github.com/users/Zapata/orgs","repos_url":"https://api.github.com/users/Zapata/repos","events_url":"https://api.github.com/users/Zapata/events{/privacy}","received_events_url":"https://api.github.com/users/Zapata/received_events","type":"User","site_admin":false},"repo":{"id":144216915,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQyMTY5MTU=","name":"bitshares-python-api-backend","full_name":"Zapata/bitshares-python-api-backend","owner":{"login":"Zapata","id":490068,"node_id":"MDQ6VXNlcjQ5MDA2OA==","avatar_url":"https://avatars2.githubusercontent.com/u/490068?v=4","gravatar_id":"","url":"https://api.github.com/users/Zapata","html_url":"https://github.com/Zapata","followers_url":"https://api.github.com/users/Zapata/followers","following_url":"https://api.github.com/users/Zapata/following{/other_user}","gists_url":"https://api.github.com/users/Zapata/gists{/gist_id}","starred_url":"https://api.github.com/users/Zapata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zapata/subscriptions","organizations_url":"https://api.github.com/users/Zapata/orgs","repos_url":"https://api.github.com/users/Zapata/repos","events_url":"https://api.github.com/users/Zapata/events{/privacy}","received_events_url":"https://api.github.com/users/Zapata/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zapata/bitshares-python-api-backend","description":"bitshares python api backend","fork":true,"url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend","forks_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/forks","keys_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/teams","hooks_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/hooks","issue_events_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/issues/events{/number}","events_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/events","assignees_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/assignees{/user}","branches_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/branches{/branch}","tags_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/tags","blobs_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/languages","stargazers_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/stargazers","contributors_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/contributors","subscribers_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/subscribers","subscription_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/subscription","commits_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/contents/{+path}","compare_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/merges","archive_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/downloads","issues_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/issues{/number}","pulls_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/labels{/name}","releases_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/releases{/id}","deployments_url":"https://api.github.com/repos/Zapata/bitshares-python-api-backend/deployments","created_at":"2018-08-10T00:27:31Z","updated_at":"2018-08-22T17:36:59Z","pushed_at":"2018-08-22T17:37:32Z","git_url":"git://github.com/Zapata/bitshares-python-api-backend.git","ssh_url":"git@github.com:Zapata/bitshares-python-api-backend.git","clone_url":"https://github.com/Zapata/bitshares-python-api-backend.git","svn_url":"https://github.com/Zapata/bitshares-python-api-backend","homepage":null,"size":213,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"oxarbitrage:master","ref":"master","sha":"3e43216b538f065a70f16dee5e876f9370b2c97e","user":{"login":"oxarbitrage","id":21685097,"node_id":"MDQ6VXNlcjIxNjg1MDk3","avatar_url":"https://avatars0.githubusercontent.com/u/21685097?v=4","gravatar_id":"","url":"https://api.github.com/users/oxarbitrage","html_url":"https://github.com/oxarbitrage","followers_url":"https://api.github.com/users/oxarbitrage/followers","following_url":"https://api.github.com/users/oxarbitrage/following{/other_user}","gists_url":"https://api.github.com/users/oxarbitrage/gists{/gist_id}","starred_url":"https://api.github.com/users/oxarbitrage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxarbitrage/subscriptions","organizations_url":"https://api.github.com/users/oxarbitrage/orgs","repos_url":"https://api.github.com/users/oxarbitrage/repos","events_url":"https://api.github.com/users/oxarbitrage/events{/privacy}","received_events_url":"https://api.github.com/users/oxarbitrage/received_events","type":"User","site_admin":false},"repo":{"id":92542877,"node_id":"MDEwOlJlcG9zaXRvcnk5MjU0Mjg3Nw==","name":"bitshares-explorer-api","full_name":"oxarbitrage/bitshares-explorer-api","owner":{"login":"oxarbitrage","id":21685097,"node_id":"MDQ6VXNlcjIxNjg1MDk3","avatar_url":"https://avatars0.githubusercontent.com/u/21685097?v=4","gravatar_id":"","url":"https://api.github.com/users/oxarbitrage","html_url":"https://github.com/oxarbitrage","followers_url":"https://api.github.com/users/oxarbitrage/followers","following_url":"https://api.github.com/users/oxarbitrage/following{/other_user}","gists_url":"https://api.github.com/users/oxarbitrage/gists{/gist_id}","starred_url":"https://api.github.com/users/oxarbitrage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxarbitrage/subscriptions","organizations_url":"https://api.github.com/users/oxarbitrage/orgs","repos_url":"https://api.github.com/users/oxarbitrage/repos","events_url":"https://api.github.com/users/oxarbitrage/events{/privacy}","received_events_url":"https://api.github.com/users/oxarbitrage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oxarbitrage/bitshares-explorer-api","description":"bitshares python api backend","fork":false,"url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api","forks_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/forks","keys_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/teams","hooks_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/hooks","issue_events_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/issues/events{/number}","events_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/events","assignees_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/assignees{/user}","branches_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/branches{/branch}","tags_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/tags","blobs_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/statuses/{sha}","languages_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/languages","stargazers_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/stargazers","contributors_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/contributors","subscribers_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/subscribers","subscription_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/subscription","commits_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/contents/{+path}","compare_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/merges","archive_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/downloads","issues_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/issues{/number}","pulls_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/pulls{/number}","milestones_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/milestones{/number}","notifications_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/labels{/name}","releases_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/releases{/id}","deployments_url":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/deployments","created_at":"2017-05-26T19:37:21Z","updated_at":"2018-08-22T17:36:15Z","pushed_at":"2018-08-22T19:29:49Z","git_url":"git://github.com/oxarbitrage/bitshares-explorer-api.git","ssh_url":"git@github.com:oxarbitrage/bitshares-explorer-api.git","clone_url":"https://github.com/oxarbitrage/bitshares-explorer-api.git","svn_url":"https://github.com/oxarbitrage/bitshares-explorer-api","homepage":null,"size":191,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":10,"open_issues":7,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/pulls/31"},"html":{"href":"https://github.com/oxarbitrage/bitshares-explorer-api/pull/31"},"issue":{"href":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/issues/31"},"comments":{"href":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/oxarbitrage/bitshares-explorer-api/statuses/043c74b454ab72a0a13fb318e510fa60e78be2d1"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"oxarbitrage","id":21685097,"node_id":"MDQ6VXNlcjIxNjg1MDk3","avatar_url":"https://avatars0.githubusercontent.com/u/21685097?v=4","gravatar_id":"","url":"https://api.github.com/users/oxarbitrage","html_url":"https://github.com/oxarbitrage","followers_url":"https://api.github.com/users/oxarbitrage/followers","following_url":"https://api.github.com/users/oxarbitrage/following{/other_user}","gists_url":"https://api.github.com/users/oxarbitrage/gists{/gist_id}","starred_url":"https://api.github.com/users/oxarbitrage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxarbitrage/subscriptions","organizations_url":"https://api.github.com/users/oxarbitrage/orgs","repos_url":"https://api.github.com/users/oxarbitrage/repos","events_url":"https://api.github.com/users/oxarbitrage/events{/privacy}","received_events_url":"https://api.github.com/users/oxarbitrage/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":14,"additions":293,"deletions":420,"changed_files":13}}
{"actor":{"display_login":"oxarbitrage"}}