{"action":"created","issue":{"url":"https://api.github.com/repos/Katello/katello/issues/5960","repository_url":"https://api.github.com/repos/Katello/katello","labels_url":"https://api.github.com/repos/Katello/katello/issues/5960/labels{/name}","comments_url":"https://api.github.com/repos/Katello/katello/issues/5960/comments","events_url":"https://api.github.com/repos/Katello/katello/issues/5960/events","html_url":"https://github.com/Katello/katello/pull/5960","id":147889103,"number":5960,"title":"Fixes #14428 - improves performance with purge empty errata and groups","user":{"login":"jlsherrill","id":395077,"avatar_url":"https://avatars.githubusercontent.com/u/395077?v=3","gravatar_id":"","url":"https://api.github.com/users/jlsherrill","html_url":"https://github.com/jlsherrill","followers_url":"https://api.github.com/users/jlsherrill/followers","following_url":"https://api.github.com/users/jlsherrill/following{/other_user}","gists_url":"https://api.github.com/users/jlsherrill/gists{/gist_id}","starred_url":"https://api.github.com/users/jlsherrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlsherrill/subscriptions","organizations_url":"https://api.github.com/users/jlsherrill/orgs","repos_url":"https://api.github.com/users/jlsherrill/repos","events_url":"https://api.github.com/users/jlsherrill/events{/privacy}","received_events_url":"https://api.github.com/users/jlsherrill/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Katello/katello/labels/Needs%20testing","name":"Needs testing","color":"fbca04"},{"url":"https://api.github.com/repos/Katello/katello/labels/Not%20yet%20reviewed","name":"Not yet reviewed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-12T22:12:05Z","updated_at":"2016-04-13T14:54:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Katello/katello/pulls/5960","html_url":"https://github.com/Katello/katello/pull/5960","diff_url":"https://github.com/Katello/katello/pull/5960.diff","patch_url":"https://github.com/Katello/katello/pull/5960.patch"},"body":"This improves and streamlines the purge empty errata and purge empty group tasks.\r\nPreviously we did not index all of the data until after these steps ran, causing us to\r\ngo to pulp for lots of data that could be really slow on heavily loaded systems.\r\n\r\nWith this change we index prior to these steps and use our database whenever possible.\r\n\r\nOn a lightly loaded satellite this only saved about 14 seconds for PurgeEmptyErrata\r\n(17s vs 3s) and 10 seconds for PurgeEmptyPackageGroups (11s vs  8s). However for\r\nheavily loaded systems the slowest part of each of the steps no longer exists\r\n(pulling all the package filenames and names for all rpms in the repo).  Some servers\r\nhave seen these steps take ~30 mintues or longer due to these calls."},"comment":{"url":"https://api.github.com/repos/Katello/katello/issues/comments/209488778","html_url":"https://github.com/Katello/katello/pull/5960#issuecomment-209488778","issue_url":"https://api.github.com/repos/Katello/katello/issues/5960","id":209488778,"user":{"login":"ehelms","id":293363,"avatar_url":"https://avatars.githubusercontent.com/u/293363?v=3","gravatar_id":"","url":"https://api.github.com/users/ehelms","html_url":"https://github.com/ehelms","followers_url":"https://api.github.com/users/ehelms/followers","following_url":"https://api.github.com/users/ehelms/following{/other_user}","gists_url":"https://api.github.com/users/ehelms/gists{/gist_id}","starred_url":"https://api.github.com/users/ehelms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehelms/subscriptions","organizations_url":"https://api.github.com/users/ehelms/orgs","repos_url":"https://api.github.com/users/ehelms/repos","events_url":"https://api.github.com/users/ehelms/events{/privacy}","received_events_url":"https://api.github.com/users/ehelms/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T14:54:20Z","updated_at":"2016-04-13T14:54:20Z","body":"I don't like across the board changes (especially buried inside another change like this). The class length is still a good reminder when we hit it to question why a class has finally hit that point -- is it overloaded? is the PR itself adding more than it should to to it? should this be an indicator to open a refactoring PR for a particular class? If we remove this across the board, we won't have a reminder to ask ourselves these questions when PRs are opened."}}