{"action":"created","comment":{"url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/comments/152449140","pull_request_review_id":78313126,"id":152449140,"diff_hunk":"@@ -122,6 +115,15 @@ def humanize_name(name, resource, humanize_name_option)\n \n     private\n \n+    def add_collection_to_csv(csv, controller, csv_options)\n+      (1..paginated_collection.total_pages).each do |page|\n+        paginated_collection(page).each do |resource|\n+          resource = controller.send :apply_decorator, resource\n+          csv << CSV.generate_line(build_row(resource, columns, options), csv_options)","path":"lib/active_admin/csv_builder.rb","position":null,"original_position":32,"commit_id":"20081806c6627cd5905905f195b83a6f41fd3e28","original_commit_id":"cac35706b87f2b490b72aefd449d2beca175d9b0","user":{"login":"f1sherman","id":349804,"avatar_url":"https://avatars0.githubusercontent.com/u/349804?v=4","gravatar_id":"","url":"https://api.github.com/users/f1sherman","html_url":"https://github.com/f1sherman","followers_url":"https://api.github.com/users/f1sherman/followers","following_url":"https://api.github.com/users/f1sherman/following{/other_user}","gists_url":"https://api.github.com/users/f1sherman/gists{/gist_id}","starred_url":"https://api.github.com/users/f1sherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f1sherman/subscriptions","organizations_url":"https://api.github.com/users/f1sherman/orgs","repos_url":"https://api.github.com/users/f1sherman/repos","events_url":"https://api.github.com/users/f1sherman/events{/privacy}","received_events_url":"https://api.github.com/users/f1sherman/received_events","type":"User","site_admin":false},"body":"@varyonic no problem, I updated it to be a lambda again!","created_at":"2017-11-22T01:35:22Z","updated_at":"2017-11-22T01:35:22Z","html_url":"https://github.com/activeadmin/activeadmin/pull/5251#discussion_r152449140","pull_request_url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/5251","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/comments/152449140"},"html":{"href":"https://github.com/activeadmin/activeadmin/pull/5251#discussion_r152449140"},"pull_request":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/5251"}},"in_reply_to_id":152445552},"pull_request":{"url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/5251","id":153983565,"html_url":"https://github.com/activeadmin/activeadmin/pull/5251","diff_url":"https://github.com/activeadmin/activeadmin/pull/5251.diff","patch_url":"https://github.com/activeadmin/activeadmin/pull/5251.patch","issue_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5251","number":5251,"state":"open","locked":false,"title":"Mitigate memory bloat with CSV exports","user":{"login":"f1sherman","id":349804,"avatar_url":"https://avatars0.githubusercontent.com/u/349804?v=4","gravatar_id":"","url":"https://api.github.com/users/f1sherman","html_url":"https://github.com/f1sherman","followers_url":"https://api.github.com/users/f1sherman/followers","following_url":"https://api.github.com/users/f1sherman/following{/other_user}","gists_url":"https://api.github.com/users/f1sherman/gists{/gist_id}","starred_url":"https://api.github.com/users/f1sherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f1sherman/subscriptions","organizations_url":"https://api.github.com/users/f1sherman/orgs","repos_url":"https://api.github.com/users/f1sherman/repos","events_url":"https://api.github.com/users/f1sherman/events{/privacy}","received_events_url":"https://api.github.com/users/f1sherman/received_events","type":"User","site_admin":false},"body":"As reported in #4118 large CSV exports can cause memory bloat via `ActiveRecord::QueryCache`. This change disables the query cache while performing a CSV export to mitigate.","created_at":"2017-11-21T19:43:19Z","updated_at":"2017-11-22T01:35:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eecee1e3f4d9a3bf7fd37974a7d412a8b832adf8","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/5251/commits","review_comments_url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/5251/comments","review_comment_url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5251/comments","statuses_url":"https://api.github.com/repos/activeadmin/activeadmin/statuses/20081806c6627cd5905905f195b83a6f41fd3e28","head":{"label":"f1sherman:4118-mitigate-csv-activerecord-memory-bloat","ref":"4118-mitigate-csv-activerecord-memory-bloat","sha":"20081806c6627cd5905905f195b83a6f41fd3e28","user":{"login":"f1sherman","id":349804,"avatar_url":"https://avatars0.githubusercontent.com/u/349804?v=4","gravatar_id":"","url":"https://api.github.com/users/f1sherman","html_url":"https://github.com/f1sherman","followers_url":"https://api.github.com/users/f1sherman/followers","following_url":"https://api.github.com/users/f1sherman/following{/other_user}","gists_url":"https://api.github.com/users/f1sherman/gists{/gist_id}","starred_url":"https://api.github.com/users/f1sherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f1sherman/subscriptions","organizations_url":"https://api.github.com/users/f1sherman/orgs","repos_url":"https://api.github.com/users/f1sherman/repos","events_url":"https://api.github.com/users/f1sherman/events{/privacy}","received_events_url":"https://api.github.com/users/f1sherman/received_events","type":"User","site_admin":false},"repo":{"id":111582184,"name":"activeadmin","full_name":"f1sherman/activeadmin","owner":{"login":"f1sherman","id":349804,"avatar_url":"https://avatars0.githubusercontent.com/u/349804?v=4","gravatar_id":"","url":"https://api.github.com/users/f1sherman","html_url":"https://github.com/f1sherman","followers_url":"https://api.github.com/users/f1sherman/followers","following_url":"https://api.github.com/users/f1sherman/following{/other_user}","gists_url":"https://api.github.com/users/f1sherman/gists{/gist_id}","starred_url":"https://api.github.com/users/f1sherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f1sherman/subscriptions","organizations_url":"https://api.github.com/users/f1sherman/orgs","repos_url":"https://api.github.com/users/f1sherman/repos","events_url":"https://api.github.com/users/f1sherman/events{/privacy}","received_events_url":"https://api.github.com/users/f1sherman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/f1sherman/activeadmin","description":"The administration framework for Ruby on Rails applications.","fork":true,"url":"https://api.github.com/repos/f1sherman/activeadmin","forks_url":"https://api.github.com/repos/f1sherman/activeadmin/forks","keys_url":"https://api.github.com/repos/f1sherman/activeadmin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/f1sherman/activeadmin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/f1sherman/activeadmin/teams","hooks_url":"https://api.github.com/repos/f1sherman/activeadmin/hooks","issue_events_url":"https://api.github.com/repos/f1sherman/activeadmin/issues/events{/number}","events_url":"https://api.github.com/repos/f1sherman/activeadmin/events","assignees_url":"https://api.github.com/repos/f1sherman/activeadmin/assignees{/user}","branches_url":"https://api.github.com/repos/f1sherman/activeadmin/branches{/branch}","tags_url":"https://api.github.com/repos/f1sherman/activeadmin/tags","blobs_url":"https://api.github.com/repos/f1sherman/activeadmin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/f1sherman/activeadmin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/f1sherman/activeadmin/git/refs{/sha}","trees_url":"https://api.github.com/repos/f1sherman/activeadmin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/f1sherman/activeadmin/statuses/{sha}","languages_url":"https://api.github.com/repos/f1sherman/activeadmin/languages","stargazers_url":"https://api.github.com/repos/f1sherman/activeadmin/stargazers","contributors_url":"https://api.github.com/repos/f1sherman/activeadmin/contributors","subscribers_url":"https://api.github.com/repos/f1sherman/activeadmin/subscribers","subscription_url":"https://api.github.com/repos/f1sherman/activeadmin/subscription","commits_url":"https://api.github.com/repos/f1sherman/activeadmin/commits{/sha}","git_commits_url":"https://api.github.com/repos/f1sherman/activeadmin/git/commits{/sha}","comments_url":"https://api.github.com/repos/f1sherman/activeadmin/comments{/number}","issue_comment_url":"https://api.github.com/repos/f1sherman/activeadmin/issues/comments{/number}","contents_url":"https://api.github.com/repos/f1sherman/activeadmin/contents/{+path}","compare_url":"https://api.github.com/repos/f1sherman/activeadmin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/f1sherman/activeadmin/merges","archive_url":"https://api.github.com/repos/f1sherman/activeadmin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/f1sherman/activeadmin/downloads","issues_url":"https://api.github.com/repos/f1sherman/activeadmin/issues{/number}","pulls_url":"https://api.github.com/repos/f1sherman/activeadmin/pulls{/number}","milestones_url":"https://api.github.com/repos/f1sherman/activeadmin/milestones{/number}","notifications_url":"https://api.github.com/repos/f1sherman/activeadmin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/f1sherman/activeadmin/labels{/name}","releases_url":"https://api.github.com/repos/f1sherman/activeadmin/releases{/id}","deployments_url":"https://api.github.com/repos/f1sherman/activeadmin/deployments","created_at":"2017-11-21T17:46:27Z","updated_at":"2017-11-21T17:46:31Z","pushed_at":"2017-11-22T01:34:54Z","git_url":"git://github.com/f1sherman/activeadmin.git","ssh_url":"git@github.com:f1sherman/activeadmin.git","clone_url":"https://github.com/f1sherman/activeadmin.git","svn_url":"https://github.com/f1sherman/activeadmin","homepage":"https://activeadmin.info","size":7303,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"activeadmin:master","ref":"master","sha":"9af04e7516fc8b34bb126990a1b1a05b57f3b0c7","user":{"login":"activeadmin","id":814570,"avatar_url":"https://avatars1.githubusercontent.com/u/814570?v=4","gravatar_id":"","url":"https://api.github.com/users/activeadmin","html_url":"https://github.com/activeadmin","followers_url":"https://api.github.com/users/activeadmin/followers","following_url":"https://api.github.com/users/activeadmin/following{/other_user}","gists_url":"https://api.github.com/users/activeadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/activeadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activeadmin/subscriptions","organizations_url":"https://api.github.com/users/activeadmin/orgs","repos_url":"https://api.github.com/users/activeadmin/repos","events_url":"https://api.github.com/users/activeadmin/events{/privacy}","received_events_url":"https://api.github.com/users/activeadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":611921,"name":"activeadmin","full_name":"activeadmin/activeadmin","owner":{"login":"activeadmin","id":814570,"avatar_url":"https://avatars1.githubusercontent.com/u/814570?v=4","gravatar_id":"","url":"https://api.github.com/users/activeadmin","html_url":"https://github.com/activeadmin","followers_url":"https://api.github.com/users/activeadmin/followers","following_url":"https://api.github.com/users/activeadmin/following{/other_user}","gists_url":"https://api.github.com/users/activeadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/activeadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activeadmin/subscriptions","organizations_url":"https://api.github.com/users/activeadmin/orgs","repos_url":"https://api.github.com/users/activeadmin/repos","events_url":"https://api.github.com/users/activeadmin/events{/privacy}","received_events_url":"https://api.github.com/users/activeadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/activeadmin/activeadmin","description":"The administration framework for Ruby on Rails applications.","fork":false,"url":"https://api.github.com/repos/activeadmin/activeadmin","forks_url":"https://api.github.com/repos/activeadmin/activeadmin/forks","keys_url":"https://api.github.com/repos/activeadmin/activeadmin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/activeadmin/activeadmin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/activeadmin/activeadmin/teams","hooks_url":"https://api.github.com/repos/activeadmin/activeadmin/hooks","issue_events_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/events{/number}","events_url":"https://api.github.com/repos/activeadmin/activeadmin/events","assignees_url":"https://api.github.com/repos/activeadmin/activeadmin/assignees{/user}","branches_url":"https://api.github.com/repos/activeadmin/activeadmin/branches{/branch}","tags_url":"https://api.github.com/repos/activeadmin/activeadmin/tags","blobs_url":"https://api.github.com/repos/activeadmin/activeadmin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/activeadmin/activeadmin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/activeadmin/activeadmin/git/refs{/sha}","trees_url":"https://api.github.com/repos/activeadmin/activeadmin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/activeadmin/activeadmin/statuses/{sha}","languages_url":"https://api.github.com/repos/activeadmin/activeadmin/languages","stargazers_url":"https://api.github.com/repos/activeadmin/activeadmin/stargazers","contributors_url":"https://api.github.com/repos/activeadmin/activeadmin/contributors","subscribers_url":"https://api.github.com/repos/activeadmin/activeadmin/subscribers","subscription_url":"https://api.github.com/repos/activeadmin/activeadmin/subscription","commits_url":"https://api.github.com/repos/activeadmin/activeadmin/commits{/sha}","git_commits_url":"https://api.github.com/repos/activeadmin/activeadmin/git/commits{/sha}","comments_url":"https://api.github.com/repos/activeadmin/activeadmin/comments{/number}","issue_comment_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/comments{/number}","contents_url":"https://api.github.com/repos/activeadmin/activeadmin/contents/{+path}","compare_url":"https://api.github.com/repos/activeadmin/activeadmin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/activeadmin/activeadmin/merges","archive_url":"https://api.github.com/repos/activeadmin/activeadmin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/activeadmin/activeadmin/downloads","issues_url":"https://api.github.com/repos/activeadmin/activeadmin/issues{/number}","pulls_url":"https://api.github.com/repos/activeadmin/activeadmin/pulls{/number}","milestones_url":"https://api.github.com/repos/activeadmin/activeadmin/milestones{/number}","notifications_url":"https://api.github.com/repos/activeadmin/activeadmin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/activeadmin/activeadmin/labels{/name}","releases_url":"https://api.github.com/repos/activeadmin/activeadmin/releases{/id}","deployments_url":"https://api.github.com/repos/activeadmin/activeadmin/deployments","created_at":"2010-04-15T14:26:03Z","updated_at":"2017-11-21T23:22:31Z","pushed_at":"2017-11-22T01:35:00Z","git_url":"git://github.com/activeadmin/activeadmin.git","ssh_url":"git@github.com:activeadmin/activeadmin.git","clone_url":"https://github.com/activeadmin/activeadmin.git","svn_url":"https://github.com/activeadmin/activeadmin","homepage":"https://activeadmin.info","size":7302,"stargazers_count":7664,"watchers_count":7664,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":2760,"mirror_url":null,"archived":false,"open_issues_count":184,"forks":2760,"open_issues":184,"watchers":7664,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/5251"},"html":{"href":"https://github.com/activeadmin/activeadmin/pull/5251"},"issue":{"href":"https://api.github.com/repos/activeadmin/activeadmin/issues/5251"},"comments":{"href":"https://api.github.com/repos/activeadmin/activeadmin/issues/5251/comments"},"review_comments":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/5251/comments"},"review_comment":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/5251/commits"},"statuses":{"href":"https://api.github.com/repos/activeadmin/activeadmin/statuses/20081806c6627cd5905905f195b83a6f41fd3e28"}},"author_association":"NONE"}}
{"actor":{"display_login":"f1sherman"}}