{"action":"created","issue":{"url":"https://api.github.com/repos/tendermint/tendermint/issues/2188","repository_url":"https://api.github.com/repos/tendermint/tendermint","labels_url":"https://api.github.com/repos/tendermint/tendermint/issues/2188/labels{/name}","comments_url":"https://api.github.com/repos/tendermint/tendermint/issues/2188/comments","events_url":"https://api.github.com/repos/tendermint/tendermint/issues/2188/events","html_url":"https://github.com/tendermint/tendermint/pull/2188","id":348912763,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MTUzODYz","number":2188,"title":"mempool: Keep cache hashmap and linked list in sync","user":{"login":"ValarDragon","id":6440154,"node_id":"MDQ6VXNlcjY0NDAxNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/6440154?v=4","gravatar_id":"","url":"https://api.github.com/users/ValarDragon","html_url":"https://github.com/ValarDragon","followers_url":"https://api.github.com/users/ValarDragon/followers","following_url":"https://api.github.com/users/ValarDragon/following{/other_user}","gists_url":"https://api.github.com/users/ValarDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/ValarDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ValarDragon/subscriptions","organizations_url":"https://api.github.com/users/ValarDragon/orgs","repos_url":"https://api.github.com/users/ValarDragon/repos","events_url":"https://api.github.com/users/ValarDragon/events{/privacy}","received_events_url":"https://api.github.com/users/ValarDragon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-08T22:19:30Z","updated_at":"2018-08-09T05:11:40Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/tendermint/tendermint/pulls/2188","html_url":"https://github.com/tendermint/tendermint/pull/2188","diff_url":"https://github.com/tendermint/tendermint/pull/2188.diff","patch_url":"https://github.com/tendermint/tendermint/pull/2188.patch"},"body":"This removes bugs with the linked list being full, but hashmap empty.\r\n\r\nRef #2180 \r\n\r\n<!-- Thanks for filing a PR! Before hitting the button, please check the following items.-->\r\n\r\n* [ ] Updated all relevant documentation in docs\r\n* [ ] Updated all code comments where relevant\r\n* [x] Wrote tests\r\n* [x] Updated CHANGELOG_PENDING.md\r\n"},"comment":{"url":"https://api.github.com/repos/tendermint/tendermint/issues/comments/411638702","html_url":"https://github.com/tendermint/tendermint/pull/2188#issuecomment-411638702","issue_url":"https://api.github.com/repos/tendermint/tendermint/issues/2188","id":411638702,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTYzODcwMg==","user":{"login":"ValarDragon","id":6440154,"node_id":"MDQ6VXNlcjY0NDAxNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/6440154?v=4","gravatar_id":"","url":"https://api.github.com/users/ValarDragon","html_url":"https://github.com/ValarDragon","followers_url":"https://api.github.com/users/ValarDragon/followers","following_url":"https://api.github.com/users/ValarDragon/following{/other_user}","gists_url":"https://api.github.com/users/ValarDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/ValarDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ValarDragon/subscriptions","organizations_url":"https://api.github.com/users/ValarDragon/orgs","repos_url":"https://api.github.com/users/ValarDragon/repos","events_url":"https://api.github.com/users/ValarDragon/events{/privacy}","received_events_url":"https://api.github.com/users/ValarDragon/received_events","type":"User","site_admin":false},"created_at":"2018-08-09T05:11:40Z","updated_at":"2018-08-09T05:11:40Z","author_association":"MEMBER","body":"before:\r\n```\r\nBenchmarkCacheInsertTime-8   \t 5000000\t       385 ns/op\t      88 B/op\t       3 allocs/op\r\nBenchmarkCacheRemoveTime-8   \t10000000\t       152 ns/op\t       0 B/op\t       0 allocs/op\r\n```\r\nafter:\r\n```\r\nBenchmarkCacheInsertTime-8   \t 1000000\t      1027 ns/op\t     360 B/op\t       7 allocs/op\r\nBenchmarkCacheRemoveTime-8   \t 2000000\t       860 ns/op\t     112 B/op\t       2 allocs/op\r\n```\r\nSo it looks like we're getting a performance hit due to the concurrent list. However this performance hit is neglible compared to the signature verification of saving a checkTx, and we are now saving memory from elements we remove from the cache. (The before case didn't remove it at all from the linked list. If we used the O(N) method to do that properly, it would certainly be slower)"}}
{"actor":{"display_login":"ValarDragon"}}