{"action":"created","issue":{"url":"https://api.github.com/repos/brutasse/graphite-api/issues/119","labels_url":"https://api.github.com/repos/brutasse/graphite-api/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/brutasse/graphite-api/issues/119/comments","events_url":"https://api.github.com/repos/brutasse/graphite-api/issues/119/events","html_url":"https://github.com/brutasse/graphite-api/pull/119","id":95503197,"number":119,"title":"Now getting paths from all targets before fetching data.","user":{"login":"absalon-james","id":4764416,"avatar_url":"https://avatars.githubusercontent.com/u/4764416?v=3","gravatar_id":"","url":"https://api.github.com/users/absalon-james","html_url":"https://github.com/absalon-james","followers_url":"https://api.github.com/users/absalon-james/followers","following_url":"https://api.github.com/users/absalon-james/following{/other_user}","gists_url":"https://api.github.com/users/absalon-james/gists{/gist_id}","starred_url":"https://api.github.com/users/absalon-james/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/absalon-james/subscriptions","organizations_url":"https://api.github.com/users/absalon-james/orgs","repos_url":"https://api.github.com/users/absalon-james/repos","events_url":"https://api.github.com/users/absalon-james/events{/privacy}","received_events_url":"https://api.github.com/users/absalon-james/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-16T19:04:01Z","updated_at":"2015-08-03T16:05:52Z","closed_at":"2015-07-22T06:42:59Z","pull_request":{"url":"https://api.github.com/repos/brutasse/graphite-api/pulls/119","html_url":"https://github.com/brutasse/graphite-api/pull/119","diff_url":"https://github.com/brutasse/graphite-api/pull/119.diff","patch_url":"https://github.com/brutasse/graphite-api/pull/119.patch"},"body":"Greetings,\r\n\r\nI have been using the awesome graphite-api now for a few months. I have run into some scaling issues where I am sometimes looking at a composition of 80 metrics (40 targets, each a metric as a percent of another metric) at a time and wanted to take some steps in order to take more advantage of the 'fetch_multi' feature.\r\n\r\nThis pull request aims to find all paths and fetch all data before evaluating targets. The general process is to find paths from all targets, get all data for all paths into a single data store, then provide access to the data store to evaluateTarget. Functions in functions.py that alter the requestContext and re-fetch the data will not see any improvement as data is fetched when the target is evaluated.\r\n"},"comment":{"url":"https://api.github.com/repos/brutasse/graphite-api/issues/comments/127289121","html_url":"https://github.com/brutasse/graphite-api/pull/119#issuecomment-127289121","issue_url":"https://api.github.com/repos/brutasse/graphite-api/issues/119","id":127289121,"user":{"login":"ibuclaw","id":397929,"avatar_url":"https://avatars.githubusercontent.com/u/397929?v=3","gravatar_id":"","url":"https://api.github.com/users/ibuclaw","html_url":"https://github.com/ibuclaw","followers_url":"https://api.github.com/users/ibuclaw/followers","following_url":"https://api.github.com/users/ibuclaw/following{/other_user}","gists_url":"https://api.github.com/users/ibuclaw/gists{/gist_id}","starred_url":"https://api.github.com/users/ibuclaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibuclaw/subscriptions","organizations_url":"https://api.github.com/users/ibuclaw/orgs","repos_url":"https://api.github.com/users/ibuclaw/repos","events_url":"https://api.github.com/users/ibuclaw/events{/privacy}","received_events_url":"https://api.github.com/users/ibuclaw/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T16:05:52Z","updated_at":"2015-08-03T16:05:52Z","body":"From what I can see on the testing server, it falls once rendering is complete.  However on production, there could be anywhere up to 40 people using it at any given time (keeping a tab open on a screen that refreshes data every minute or so).  So it showed itself as being always 100%\r\n\r\nI've just redeployed it again, and it seems like it has calmed down for now...  See below, you can see where initially restarted graphite-api, rolled back at 14:25, then restarted with this PR applied at 14:30, before finally reverting completely.\r\n\r\n![graphite-cpu](https://cloud.githubusercontent.com/assets/397929/9041691/b19ae5e4-3a09-11e5-9319-25c32eb3de59.png)\r\n"}}