{"action":"closed","number":104,"pull_request":{"url":"https://api.github.com/repos/zodb/relstorage/pulls/104","id":76640259,"html_url":"https://github.com/zodb/relstorage/pull/104","diff_url":"https://github.com/zodb/relstorage/pull/104.diff","patch_url":"https://github.com/zodb/relstorage/pull/104.patch","issue_url":"https://api.github.com/repos/zodb/relstorage/issues/104","number":104,"state":"closed","locked":false,"title":"Finer LRU","user":{"login":"jamadden","id":1256082,"avatar_url":"https://avatars.githubusercontent.com/u/1256082?v=3","gravatar_id":"","url":"https://api.github.com/users/jamadden","html_url":"https://github.com/jamadden","followers_url":"https://api.github.com/users/jamadden/followers","following_url":"https://api.github.com/users/jamadden/following{/other_user}","gists_url":"https://api.github.com/users/jamadden/gists{/gist_id}","starred_url":"https://api.github.com/users/jamadden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamadden/subscriptions","organizations_url":"https://api.github.com/users/jamadden/orgs","repos_url":"https://api.github.com/users/jamadden/repos","events_url":"https://api.github.com/users/jamadden/events{/privacy}","received_events_url":"https://api.github.com/users/jamadden/received_events","type":"User","site_admin":false},"body":"This uses `persistent.ring.Ring`, a linked-list-like structure already optimized for both PyPy and CPython to manage an actual LRU list and individually discard the LRU items on memory pressure. This should let us actually store more useful data in the pickle cache. (Ring is documented, but also considered an implementation detail; however, I wrote it and consider it safe to use here.)\r\n\r\nIt also minimizes the amount of time we spend locked.\r\n\r\nOn benchmarks, it is generally at least as fast as the prior implementation. When it comes to reading, it is faster; writing may be just a hair slower. Practically, it will depend on how many reads and writes there are done in a call to `set/get_multi` because the lock overhead seems to dominate the bookkeeping overhead.\r\n\r\nThere's some interesting history in the commits so I'm keeping them.","created_at":"2016-07-07T18:09:40Z","updated_at":"2016-07-07T18:38:15Z","closed_at":"2016-07-07T18:38:15Z","merged_at":"2016-07-07T18:38:15Z","merge_commit_sha":"458776223996ca4969368e2c0762a1b24ab1b914","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zodb/relstorage/pulls/104/commits","review_comments_url":"https://api.github.com/repos/zodb/relstorage/pulls/104/comments","review_comment_url":"https://api.github.com/repos/zodb/relstorage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zodb/relstorage/issues/104/comments","statuses_url":"https://api.github.com/repos/zodb/relstorage/statuses/156853833d69a978551a70d5aeb6f30fc5c2cf28","head":{"label":"zodb:finer-lru","ref":"finer-lru","sha":"156853833d69a978551a70d5aeb6f30fc5c2cf28","user":{"login":"zodb","id":2261655,"avatar_url":"https://avatars.githubusercontent.com/u/2261655?v=3","gravatar_id":"","url":"https://api.github.com/users/zodb","html_url":"https://github.com/zodb","followers_url":"https://api.github.com/users/zodb/followers","following_url":"https://api.github.com/users/zodb/following{/other_user}","gists_url":"https://api.github.com/users/zodb/gists{/gist_id}","starred_url":"https://api.github.com/users/zodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zodb/subscriptions","organizations_url":"https://api.github.com/users/zodb/orgs","repos_url":"https://api.github.com/users/zodb/repos","events_url":"https://api.github.com/users/zodb/events{/privacy}","received_events_url":"https://api.github.com/users/zodb/received_events","type":"Organization","site_admin":false},"repo":{"id":5642413,"name":"relstorage","full_name":"zodb/relstorage","owner":{"login":"zodb","id":2261655,"avatar_url":"https://avatars.githubusercontent.com/u/2261655?v=3","gravatar_id":"","url":"https://api.github.com/users/zodb","html_url":"https://github.com/zodb","followers_url":"https://api.github.com/users/zodb/followers","following_url":"https://api.github.com/users/zodb/following{/other_user}","gists_url":"https://api.github.com/users/zodb/gists{/gist_id}","starred_url":"https://api.github.com/users/zodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zodb/subscriptions","organizations_url":"https://api.github.com/users/zodb/orgs","repos_url":"https://api.github.com/users/zodb/repos","events_url":"https://api.github.com/users/zodb/events{/privacy}","received_events_url":"https://api.github.com/users/zodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zodb/relstorage","description":"A backend for ZODB that stores pickles in a relational database.","fork":false,"url":"https://api.github.com/repos/zodb/relstorage","forks_url":"https://api.github.com/repos/zodb/relstorage/forks","keys_url":"https://api.github.com/repos/zodb/relstorage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zodb/relstorage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zodb/relstorage/teams","hooks_url":"https://api.github.com/repos/zodb/relstorage/hooks","issue_events_url":"https://api.github.com/repos/zodb/relstorage/issues/events{/number}","events_url":"https://api.github.com/repos/zodb/relstorage/events","assignees_url":"https://api.github.com/repos/zodb/relstorage/assignees{/user}","branches_url":"https://api.github.com/repos/zodb/relstorage/branches{/branch}","tags_url":"https://api.github.com/repos/zodb/relstorage/tags","blobs_url":"https://api.github.com/repos/zodb/relstorage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zodb/relstorage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zodb/relstorage/git/refs{/sha}","trees_url":"https://api.github.com/repos/zodb/relstorage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zodb/relstorage/statuses/{sha}","languages_url":"https://api.github.com/repos/zodb/relstorage/languages","stargazers_url":"https://api.github.com/repos/zodb/relstorage/stargazers","contributors_url":"https://api.github.com/repos/zodb/relstorage/contributors","subscribers_url":"https://api.github.com/repos/zodb/relstorage/subscribers","subscription_url":"https://api.github.com/repos/zodb/relstorage/subscription","commits_url":"https://api.github.com/repos/zodb/relstorage/commits{/sha}","git_commits_url":"https://api.github.com/repos/zodb/relstorage/git/commits{/sha}","comments_url":"https://api.github.com/repos/zodb/relstorage/comments{/number}","issue_comment_url":"https://api.github.com/repos/zodb/relstorage/issues/comments{/number}","contents_url":"https://api.github.com/repos/zodb/relstorage/contents/{+path}","compare_url":"https://api.github.com/repos/zodb/relstorage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zodb/relstorage/merges","archive_url":"https://api.github.com/repos/zodb/relstorage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zodb/relstorage/downloads","issues_url":"https://api.github.com/repos/zodb/relstorage/issues{/number}","pulls_url":"https://api.github.com/repos/zodb/relstorage/pulls{/number}","milestones_url":"https://api.github.com/repos/zodb/relstorage/milestones{/number}","notifications_url":"https://api.github.com/repos/zodb/relstorage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zodb/relstorage/labels{/name}","releases_url":"https://api.github.com/repos/zodb/relstorage/releases{/id}","deployments_url":"https://api.github.com/repos/zodb/relstorage/deployments","created_at":"2012-09-01T18:47:29Z","updated_at":"2016-06-11T21:26:46Z","pushed_at":"2016-07-07T18:38:16Z","git_url":"git://github.com/zodb/relstorage.git","ssh_url":"git@github.com:zodb/relstorage.git","clone_url":"https://github.com/zodb/relstorage.git","svn_url":"https://github.com/zodb/relstorage","homepage":null,"size":2577,"stargazers_count":14,"watchers_count":14,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":13,"forks":20,"open_issues":13,"watchers":14,"default_branch":"master"}},"base":{"label":"zodb:master","ref":"master","sha":"80559c0dc7d38af103eacc0a0e1055efe5699051","user":{"login":"zodb","id":2261655,"avatar_url":"https://avatars.githubusercontent.com/u/2261655?v=3","gravatar_id":"","url":"https://api.github.com/users/zodb","html_url":"https://github.com/zodb","followers_url":"https://api.github.com/users/zodb/followers","following_url":"https://api.github.com/users/zodb/following{/other_user}","gists_url":"https://api.github.com/users/zodb/gists{/gist_id}","starred_url":"https://api.github.com/users/zodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zodb/subscriptions","organizations_url":"https://api.github.com/users/zodb/orgs","repos_url":"https://api.github.com/users/zodb/repos","events_url":"https://api.github.com/users/zodb/events{/privacy}","received_events_url":"https://api.github.com/users/zodb/received_events","type":"Organization","site_admin":false},"repo":{"id":5642413,"name":"relstorage","full_name":"zodb/relstorage","owner":{"login":"zodb","id":2261655,"avatar_url":"https://avatars.githubusercontent.com/u/2261655?v=3","gravatar_id":"","url":"https://api.github.com/users/zodb","html_url":"https://github.com/zodb","followers_url":"https://api.github.com/users/zodb/followers","following_url":"https://api.github.com/users/zodb/following{/other_user}","gists_url":"https://api.github.com/users/zodb/gists{/gist_id}","starred_url":"https://api.github.com/users/zodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zodb/subscriptions","organizations_url":"https://api.github.com/users/zodb/orgs","repos_url":"https://api.github.com/users/zodb/repos","events_url":"https://api.github.com/users/zodb/events{/privacy}","received_events_url":"https://api.github.com/users/zodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zodb/relstorage","description":"A backend for ZODB that stores pickles in a relational database.","fork":false,"url":"https://api.github.com/repos/zodb/relstorage","forks_url":"https://api.github.com/repos/zodb/relstorage/forks","keys_url":"https://api.github.com/repos/zodb/relstorage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zodb/relstorage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zodb/relstorage/teams","hooks_url":"https://api.github.com/repos/zodb/relstorage/hooks","issue_events_url":"https://api.github.com/repos/zodb/relstorage/issues/events{/number}","events_url":"https://api.github.com/repos/zodb/relstorage/events","assignees_url":"https://api.github.com/repos/zodb/relstorage/assignees{/user}","branches_url":"https://api.github.com/repos/zodb/relstorage/branches{/branch}","tags_url":"https://api.github.com/repos/zodb/relstorage/tags","blobs_url":"https://api.github.com/repos/zodb/relstorage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zodb/relstorage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zodb/relstorage/git/refs{/sha}","trees_url":"https://api.github.com/repos/zodb/relstorage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zodb/relstorage/statuses/{sha}","languages_url":"https://api.github.com/repos/zodb/relstorage/languages","stargazers_url":"https://api.github.com/repos/zodb/relstorage/stargazers","contributors_url":"https://api.github.com/repos/zodb/relstorage/contributors","subscribers_url":"https://api.github.com/repos/zodb/relstorage/subscribers","subscription_url":"https://api.github.com/repos/zodb/relstorage/subscription","commits_url":"https://api.github.com/repos/zodb/relstorage/commits{/sha}","git_commits_url":"https://api.github.com/repos/zodb/relstorage/git/commits{/sha}","comments_url":"https://api.github.com/repos/zodb/relstorage/comments{/number}","issue_comment_url":"https://api.github.com/repos/zodb/relstorage/issues/comments{/number}","contents_url":"https://api.github.com/repos/zodb/relstorage/contents/{+path}","compare_url":"https://api.github.com/repos/zodb/relstorage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zodb/relstorage/merges","archive_url":"https://api.github.com/repos/zodb/relstorage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zodb/relstorage/downloads","issues_url":"https://api.github.com/repos/zodb/relstorage/issues{/number}","pulls_url":"https://api.github.com/repos/zodb/relstorage/pulls{/number}","milestones_url":"https://api.github.com/repos/zodb/relstorage/milestones{/number}","notifications_url":"https://api.github.com/repos/zodb/relstorage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zodb/relstorage/labels{/name}","releases_url":"https://api.github.com/repos/zodb/relstorage/releases{/id}","deployments_url":"https://api.github.com/repos/zodb/relstorage/deployments","created_at":"2012-09-01T18:47:29Z","updated_at":"2016-06-11T21:26:46Z","pushed_at":"2016-07-07T18:38:16Z","git_url":"git://github.com/zodb/relstorage.git","ssh_url":"git@github.com:zodb/relstorage.git","clone_url":"https://github.com/zodb/relstorage.git","svn_url":"https://github.com/zodb/relstorage","homepage":null,"size":2577,"stargazers_count":14,"watchers_count":14,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":13,"forks":20,"open_issues":13,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zodb/relstorage/pulls/104"},"html":{"href":"https://github.com/zodb/relstorage/pull/104"},"issue":{"href":"https://api.github.com/repos/zodb/relstorage/issues/104"},"comments":{"href":"https://api.github.com/repos/zodb/relstorage/issues/104/comments"},"review_comments":{"href":"https://api.github.com/repos/zodb/relstorage/pulls/104/comments"},"review_comment":{"href":"https://api.github.com/repos/zodb/relstorage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zodb/relstorage/pulls/104/commits"},"statuses":{"href":"https://api.github.com/repos/zodb/relstorage/statuses/156853833d69a978551a70d5aeb6f30fc5c2cf28"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"jamadden","id":1256082,"avatar_url":"https://avatars.githubusercontent.com/u/1256082?v=3","gravatar_id":"","url":"https://api.github.com/users/jamadden","html_url":"https://github.com/jamadden","followers_url":"https://api.github.com/users/jamadden/followers","following_url":"https://api.github.com/users/jamadden/following{/other_user}","gists_url":"https://api.github.com/users/jamadden/gists{/gist_id}","starred_url":"https://api.github.com/users/jamadden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamadden/subscriptions","organizations_url":"https://api.github.com/users/jamadden/orgs","repos_url":"https://api.github.com/users/jamadden/repos","events_url":"https://api.github.com/users/jamadden/events{/privacy}","received_events_url":"https://api.github.com/users/jamadden/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":5,"additions":190,"deletions":104,"changed_files":3}}
{"actor":{"display_login":"jamadden"}}