{"action":"created","issue":{"url":"https://api.github.com/repos/pantheon-systems/terminus/issues/915","repository_url":"https://api.github.com/repos/pantheon-systems/terminus","labels_url":"https://api.github.com/repos/pantheon-systems/terminus/issues/915/labels{/name}","comments_url":"https://api.github.com/repos/pantheon-systems/terminus/issues/915/comments","events_url":"https://api.github.com/repos/pantheon-systems/terminus/issues/915/events","html_url":"https://github.com/pantheon-systems/terminus/issues/915","id":133397102,"number":915,"title":"terminus commands very slow to return data when you have a lot of sites","user":{"login":"pirog","id":713424,"avatar_url":"https://avatars.githubusercontent.com/u/713424?v=3","gravatar_id":"","url":"https://api.github.com/users/pirog","html_url":"https://github.com/pirog","followers_url":"https://api.github.com/users/pirog/followers","following_url":"https://api.github.com/users/pirog/following{/other_user}","gists_url":"https://api.github.com/users/pirog/gists{/gist_id}","starred_url":"https://api.github.com/users/pirog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pirog/subscriptions","organizations_url":"https://api.github.com/users/pirog/orgs","repos_url":"https://api.github.com/users/pirog/repos","events_url":"https://api.github.com/users/pirog/events{/privacy}","received_events_url":"https://api.github.com/users/pirog/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-13T04:26:44Z","updated_at":"2016-02-16T20:44:19Z","closed_at":"2016-02-16T20:44:18Z","body":"Here are some results running `site connection-info` with two different accounts. This also manifests with other commands. \r\n\r\nWith an account with two sites\r\n```\r\ntime terminus site connection-info --site=BLAH --env=dev\r\nreal\t0m1.873s\r\nuser\t0m0.116s\r\nsys\t0m0.029s\r\n```\r\n\r\nWith an account with 50+ sites\r\n```\r\ntime terminus site connection-info --site=ANOTHERBLAH --env=dev\r\nreal\t0m59.072s\r\nuser\t0m0.301s\r\nsys\t0m0.089s\r\n```"},"comment":{"url":"https://api.github.com/repos/pantheon-systems/terminus/issues/comments/184868019","html_url":"https://github.com/pantheon-systems/terminus/issues/915#issuecomment-184868019","issue_url":"https://api.github.com/repos/pantheon-systems/terminus/issues/915","id":184868019,"user":{"login":"TeslaDethray","id":868204,"avatar_url":"https://avatars.githubusercontent.com/u/868204?v=3","gravatar_id":"","url":"https://api.github.com/users/TeslaDethray","html_url":"https://github.com/TeslaDethray","followers_url":"https://api.github.com/users/TeslaDethray/followers","following_url":"https://api.github.com/users/TeslaDethray/following{/other_user}","gists_url":"https://api.github.com/users/TeslaDethray/gists{/gist_id}","starred_url":"https://api.github.com/users/TeslaDethray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeslaDethray/subscriptions","organizations_url":"https://api.github.com/users/TeslaDethray/orgs","repos_url":"https://api.github.com/users/TeslaDethray/repos","events_url":"https://api.github.com/users/TeslaDethray/events{/privacy}","received_events_url":"https://api.github.com/users/TeslaDethray/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T20:44:18Z","updated_at":"2016-02-16T20:44:18Z","body":"The application is slow because the API it accesses to gather site data is slow. When you run a command on a site and you have not previously generated the cache of all sites your user can access, the application must generate that complete list before operating in any way on that site. Unfortunately, the API automatically looks up an enormous number of records for each site, making it take a very long time. You will notice that subsequent actions on sites in both of those accounts were much faster than the first until you remove the cache files.\r\n\r\nWe are looking at adding a hydrate GET var to the site list query possibly this week in order to make the list generation faster. However, this is not a matter than can be addressed from within Terminus. "}}