{"action":"created","issue":{"url":"https://api.github.com/repos/armenzg/mozilla_ci_tools/issues/94","labels_url":"https://api.github.com/repos/armenzg/mozilla_ci_tools/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/armenzg/mozilla_ci_tools/issues/94/comments","events_url":"https://api.github.com/repos/armenzg/mozilla_ci_tools/issues/94/events","html_url":"https://github.com/armenzg/mozilla_ci_tools/issues/94","id":60000914,"number":94,"title":"Read less repositories.txt","user":{"login":"armenzg","id":44410,"avatar_url":"https://avatars.githubusercontent.com/u/44410?v=3","gravatar_id":"","url":"https://api.github.com/users/armenzg","html_url":"https://github.com/armenzg","followers_url":"https://api.github.com/users/armenzg/followers","following_url":"https://api.github.com/users/armenzg/following{/other_user}","gists_url":"https://api.github.com/users/armenzg/gists{/gist_id}","starred_url":"https://api.github.com/users/armenzg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armenzg/subscriptions","organizations_url":"https://api.github.com/users/armenzg/orgs","repos_url":"https://api.github.com/users/armenzg/repos","events_url":"https://api.github.com/users/armenzg/events{/privacy}","received_events_url":"https://api.github.com/users/armenzg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/armenzg/mozilla_ci_tools/labels/clean_up","name":"clean_up","color":"eb6420"},{"url":"https://api.github.com/repos/armenzg/mozilla_ci_tools/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"adusca","id":8979476,"avatar_url":"https://avatars.githubusercontent.com/u/8979476?v=3","gravatar_id":"","url":"https://api.github.com/users/adusca","html_url":"https://github.com/adusca","followers_url":"https://api.github.com/users/adusca/followers","following_url":"https://api.github.com/users/adusca/following{/other_user}","gists_url":"https://api.github.com/users/adusca/gists{/gist_id}","starred_url":"https://api.github.com/users/adusca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adusca/subscriptions","organizations_url":"https://api.github.com/users/adusca/orgs","repos_url":"https://api.github.com/users/adusca/repos","events_url":"https://api.github.com/users/adusca/events{/privacy}","received_events_url":"https://api.github.com/users/adusca/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-03-05T19:16:07Z","updated_at":"2015-03-06T13:14:08Z","closed_at":null,"body":"Every time we want to determine repo_name based on a buildername we end up calling query_repositories().\r\nhttps://github.com/armenzg/mozilla_ci_tools/blob/master/mozci/sources/buildapi.py#L138\r\n\r\nWe cache repositories.txt so we don't hit buildapi often and reduce latency.\r\nHowever, I believe that even reading from disk often is bad.\r\n\r\nI was thinking of designing a class that can have the knowledge of the contents of repositories.txt and every time we query it, regardless from which module, we will be able to read the values from memory rather than disk.\r\n\r\nRunning any script with --debug (You can use --dry-run) should only log once that we're reading from repositories.txt."},"comment":{"url":"https://api.github.com/repos/armenzg/mozilla_ci_tools/issues/comments/77556501","html_url":"https://github.com/armenzg/mozilla_ci_tools/issues/94#issuecomment-77556501","issue_url":"https://api.github.com/repos/armenzg/mozilla_ci_tools/issues/94","id":77556501,"user":{"login":"armenzg","id":44410,"avatar_url":"https://avatars.githubusercontent.com/u/44410?v=3","gravatar_id":"","url":"https://api.github.com/users/armenzg","html_url":"https://github.com/armenzg","followers_url":"https://api.github.com/users/armenzg/followers","following_url":"https://api.github.com/users/armenzg/following{/other_user}","gists_url":"https://api.github.com/users/armenzg/gists{/gist_id}","starred_url":"https://api.github.com/users/armenzg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armenzg/subscriptions","organizations_url":"https://api.github.com/users/armenzg/orgs","repos_url":"https://api.github.com/users/armenzg/repos","events_url":"https://api.github.com/users/armenzg/events{/privacy}","received_events_url":"https://api.github.com/users/armenzg/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T13:14:08Z","updated_at":"2015-03-06T13:14:08Z","body":"Thank you Alice!"}}