{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7997","repository_url":"https://api.github.com/repos/bitcoin/bitcoin","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7997/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7997/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7997/events","html_url":"https://github.com/bitcoin/bitcoin/pull/7997","id":152877319,"number":7997,"title":"replace mapNextTx with slimmer setSpends","user":{"login":"kazcw","id":1047859,"avatar_url":"https://avatars.githubusercontent.com/u/1047859?v=3","gravatar_id":"","url":"https://api.github.com/users/kazcw","html_url":"https://github.com/kazcw","followers_url":"https://api.github.com/users/kazcw/followers","following_url":"https://api.github.com/users/kazcw/following{/other_user}","gists_url":"https://api.github.com/users/kazcw/gists{/gist_id}","starred_url":"https://api.github.com/users/kazcw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazcw/subscriptions","organizations_url":"https://api.github.com/users/kazcw/orgs","repos_url":"https://api.github.com/users/kazcw/repos","events_url":"https://api.github.com/users/kazcw/events{/privacy}","received_events_url":"https://api.github.com/users/kazcw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Mempool","name":"Mempool","color":"fef2c0"},{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Refactoring","name":"Refactoring","color":"E6F6D6"},{"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Resource%20usage","name":"Resource usage","color":"981023"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-05-03T21:21:11Z","updated_at":"2016-06-02T23:18:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/7997","html_url":"https://github.com/bitcoin/bitcoin/pull/7997","diff_url":"https://github.com/bitcoin/bitcoin/pull/7997.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/7997.patch"},"body":"mapNextTx entries comprise about 15% of application memory usage once the mempool\r\nwarms up; most of this space is taken by the key type, which contains a uint256.\r\nThe same uint256 is accessible from the map's value type.\r\n\r\nsetSpends represents the information as a set of CSpendRefs. A CSpendRef is,\r\nlogically, a reference to a COutPoint; the COutPoint may be either \"free\" (as in\r\nthe case of setSpends.find(COutPoint(...))), or in an element of the vin of a\r\nCTransaction (as in all the values inserted into setSpend). If the COutPoint is\r\nassociated with a spending CTransaction, the CSpendRef is also capable of\r\nproviding access to the corresponding transaction.\r\n\r\n[This object bimodality is necessary because lookup on a set requires\r\nconstructing an object of the set's key type, an inconvenience corrected in\r\nC++14.]\r\n\r\nSaves about 10% of total memory usage (an entry in mapNextTx is 48 bytes; an\r\nentry in setSpends in 16 bytes). Since the mempool is DynamicUsage-regulated,\r\nthis will translate to a larger mempool in the same amount of space.\r\n\r\n(Supersedes #7991, which addressed the same issue less efficiently)"},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/223450832","html_url":"https://github.com/bitcoin/bitcoin/pull/7997#issuecomment-223450832","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/7997","id":223450832,"user":{"login":"sipa","id":548488,"avatar_url":"https://avatars.githubusercontent.com/u/548488?v=3","gravatar_id":"","url":"https://api.github.com/users/sipa","html_url":"https://github.com/sipa","followers_url":"https://api.github.com/users/sipa/followers","following_url":"https://api.github.com/users/sipa/following{/other_user}","gists_url":"https://api.github.com/users/sipa/gists{/gist_id}","starred_url":"https://api.github.com/users/sipa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sipa/subscriptions","organizations_url":"https://api.github.com/users/sipa/orgs","repos_url":"https://api.github.com/users/sipa/repos","events_url":"https://api.github.com/users/sipa/events{/privacy}","received_events_url":"https://api.github.com/users/sipa/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T23:18:44Z","updated_at":"2016-06-02T23:18:44Z","body":"utACK 9805f4af7ecb6becf8a146bd845fb131ffa625c9, but well-tested by the CTxMemPool::check function."}}
{"actor":{"display_login":"sipa"}}