{"action":"created","issue":{"url":"https://api.github.com/repos/LearningLocker/learninglocker/issues/771","repository_url":"https://api.github.com/repos/LearningLocker/learninglocker","labels_url":"https://api.github.com/repos/LearningLocker/learninglocker/issues/771/labels{/name}","comments_url":"https://api.github.com/repos/LearningLocker/learninglocker/issues/771/comments","events_url":"https://api.github.com/repos/LearningLocker/learninglocker/issues/771/events","html_url":"https://github.com/LearningLocker/learninglocker/issues/771","id":126654832,"number":771,"title":"Admin dashboard takes 15 seconds to load","user":{"login":"salexfo","id":8767588,"avatar_url":"https://avatars.githubusercontent.com/u/8767588?v=3","gravatar_id":"","url":"https://api.github.com/users/salexfo","html_url":"https://github.com/salexfo","followers_url":"https://api.github.com/users/salexfo/followers","following_url":"https://api.github.com/users/salexfo/following{/other_user}","gists_url":"https://api.github.com/users/salexfo/gists{/gist_id}","starred_url":"https://api.github.com/users/salexfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salexfo/subscriptions","organizations_url":"https://api.github.com/users/salexfo/orgs","repos_url":"https://api.github.com/users/salexfo/repos","events_url":"https://api.github.com/users/salexfo/events{/privacy}","received_events_url":"https://api.github.com/users/salexfo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/LearningLocker/learninglocker/labels/priority:high","name":"priority:high","color":"e11d21"},{"url":"https://api.github.com/repos/LearningLocker/learninglocker/labels/status:confirmed","name":"status:confirmed","color":"e11d21"},{"url":"https://api.github.com/repos/LearningLocker/learninglocker/labels/type:bug","name":"type:bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"andrewhickey","id":6569282,"avatar_url":"https://avatars.githubusercontent.com/u/6569282?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewhickey","html_url":"https://github.com/andrewhickey","followers_url":"https://api.github.com/users/andrewhickey/followers","following_url":"https://api.github.com/users/andrewhickey/following{/other_user}","gists_url":"https://api.github.com/users/andrewhickey/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewhickey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewhickey/subscriptions","organizations_url":"https://api.github.com/users/andrewhickey/orgs","repos_url":"https://api.github.com/users/andrewhickey/repos","events_url":"https://api.github.com/users/andrewhickey/events{/privacy}","received_events_url":"https://api.github.com/users/andrewhickey/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/LearningLocker/learninglocker/milestones/47","html_url":"https://github.com/LearningLocker/learninglocker/milestones/1.12.0","labels_url":"https://api.github.com/repos/LearningLocker/learninglocker/milestones/47/labels","id":1324033,"number":47,"title":"1.12.0","description":"","creator":{"login":"daniel-abbey","id":13132831,"avatar_url":"https://avatars.githubusercontent.com/u/13132831?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-abbey","html_url":"https://github.com/daniel-abbey","followers_url":"https://api.github.com/users/daniel-abbey/followers","following_url":"https://api.github.com/users/daniel-abbey/following{/other_user}","gists_url":"https://api.github.com/users/daniel-abbey/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-abbey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-abbey/subscriptions","organizations_url":"https://api.github.com/users/daniel-abbey/orgs","repos_url":"https://api.github.com/users/daniel-abbey/repos","events_url":"https://api.github.com/users/daniel-abbey/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-abbey/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":12,"state":"closed","created_at":"2015-09-25T15:21:47Z","updated_at":"2016-02-23T17:26:08Z","due_on":null,"closed_at":"2016-02-23T15:25:52Z"},"comments":11,"created_at":"2016-01-14T13:27:52Z","updated_at":"2016-04-07T13:43:06Z","closed_at":"2016-02-23T17:26:08Z","body":"Version\r\n1.11.0\r\n\r\nIf you have more than 200,000 statements if will takes you quite considerable time to load your admin dashboard after login.\r\n\r\nI tried to remove the functions public function getStats and public function getGraphData and still the load time was more than 10 seconds. I believe it might be something to do with the rendering of the graph and/or the way assests are loaded (JS before CSS). I have added an index on statement.timestamp but it did little do improve the situation.\r\n\r\nSee attached.\r\n![selection_564](https://cloud.githubusercontent.com/assets/8767588/12325496/560b2fae-bad3-11e5-823c-559d12cedee5.png)\r\n\r\nThanks,\r\nAlexander"},"comment":{"url":"https://api.github.com/repos/LearningLocker/learninglocker/issues/comments/206910476","html_url":"https://github.com/LearningLocker/learninglocker/issues/771#issuecomment-206910476","issue_url":"https://api.github.com/repos/LearningLocker/learninglocker/issues/771","id":206910476,"user":{"login":"ht2","id":1352590,"avatar_url":"https://avatars.githubusercontent.com/u/1352590?v=3","gravatar_id":"","url":"https://api.github.com/users/ht2","html_url":"https://github.com/ht2","followers_url":"https://api.github.com/users/ht2/followers","following_url":"https://api.github.com/users/ht2/following{/other_user}","gists_url":"https://api.github.com/users/ht2/gists{/gist_id}","starred_url":"https://api.github.com/users/ht2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ht2/subscriptions","organizations_url":"https://api.github.com/users/ht2/orgs","repos_url":"https://api.github.com/users/ht2/repos","events_url":"https://api.github.com/users/ht2/events{/privacy}","received_events_url":"https://api.github.com/users/ht2/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T13:43:06Z","updated_at":"2016-04-07T13:43:06Z","body":"OK, in which case look into the indexing in my blog. You could use [Mongo Profiling](https://docs.mongodb.org/manual/tutorial/manage-the-database-profiler/) to start to see where bottlenecks are  but I would expect the page itself to load instantly as the only database query of real complication on that page is the count, which should be using our forked version of the jenseggers library to ensure it uses the PHP driver's native method."}}