{"action":"created","issue":{"url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/250","labels_url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/250/labels{/name}","comments_url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/250/comments","events_url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/250/events","html_url":"https://github.com/CounterpartyXCP/counterpartyd/issues/250","id":40739642,"number":250,"title":"`util.holders(db, asset)` is slow","user":{"login":"mcelrath","id":1746780,"avatar_url":"https://avatars.githubusercontent.com/u/1746780?v=3","gravatar_id":"","url":"https://api.github.com/users/mcelrath","html_url":"https://github.com/mcelrath","followers_url":"https://api.github.com/users/mcelrath/followers","following_url":"https://api.github.com/users/mcelrath/following{/other_user}","gists_url":"https://api.github.com/users/mcelrath/gists{/gist_id}","starred_url":"https://api.github.com/users/mcelrath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcelrath/subscriptions","organizations_url":"https://api.github.com/users/mcelrath/orgs","repos_url":"https://api.github.com/users/mcelrath/repos","events_url":"https://api.github.com/users/mcelrath/events{/privacy}","received_events_url":"https://api.github.com/users/mcelrath/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/labels/speed","name":"speed","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-08-20T20:13:48Z","updated_at":"2015-01-08T01:08:21Z","closed_at":"2015-01-08T01:08:21Z","body":"Dogeparty has now issued more than 9000 assets, and has a 1 minute block time, so is consuming a lot more CPU than Counterparty running on BTC (about 36% CPU utilization on average).  I profiled it and found that over 80% of this CPU time is taken up in `util.holders(db, asset)` at `lib/util.py:631`.  This may become a limiting factor as Counterparty grows.\r\n\r\nCan the performance of this function be improved by the addition of the right indices?\r\n\r\n<bountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Place a bounty on it!](https://www.bountysource.com/issues/3950258-profiling-util-holders-db-asset-is-slow?utm_campaign=plugin&utm_content=tracker%2F494307&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F494307&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/comments/69120970","html_url":"https://github.com/CounterpartyXCP/counterpartyd/issues/250#issuecomment-69120970","issue_url":"https://api.github.com/repos/CounterpartyXCP/counterpartyd/issues/250","id":69120970,"user":{"login":"adamkrellenstein","id":6189829,"avatar_url":"https://avatars.githubusercontent.com/u/6189829?v=3","gravatar_id":"","url":"https://api.github.com/users/adamkrellenstein","html_url":"https://github.com/adamkrellenstein","followers_url":"https://api.github.com/users/adamkrellenstein/followers","following_url":"https://api.github.com/users/adamkrellenstein/following{/other_user}","gists_url":"https://api.github.com/users/adamkrellenstein/gists{/gist_id}","starred_url":"https://api.github.com/users/adamkrellenstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamkrellenstein/subscriptions","organizations_url":"https://api.github.com/users/adamkrellenstein/orgs","repos_url":"https://api.github.com/users/adamkrellenstein/repos","events_url":"https://api.github.com/users/adamkrellenstein/events{/privacy}","received_events_url":"https://api.github.com/users/adamkrellenstein/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T01:08:21Z","updated_at":"2015-01-08T01:08:21Z","body":"The only thing left to do is #347."}}