{"action":"closed","issue":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/2388","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/2388/labels{/name}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/2388/comments","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/2388/events","html_url":"https://github.com/OrchardCMS/Orchard/issues/2388","id":68197660,"number":2388,"title":"Taxonomy / GetTaxonomies generates one additional query per user","user":{"login":"orchardbot","id":11788683,"avatar_url":"https://avatars.githubusercontent.com/u/11788683?v=3","gravatar_id":"","url":"https://api.github.com/users/orchardbot","html_url":"https://github.com/orchardbot","followers_url":"https://api.github.com/users/orchardbot/followers","following_url":"https://api.github.com/users/orchardbot/following{/other_user}","gists_url":"https://api.github.com/users/orchardbot/gists{/gist_id}","starred_url":"https://api.github.com/users/orchardbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orchardbot/subscriptions","organizations_url":"https://api.github.com/users/orchardbot/orgs","repos_url":"https://api.github.com/users/orchardbot/repos","events_url":"https://api.github.com/users/orchardbot/events{/privacy}","received_events_url":"https://api.github.com/users/orchardbot/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/milestones/12","html_url":"https://github.com/OrchardCMS/Orchard/milestones/Orchard%201.5","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/milestones/12/labels","id":1065770,"number":12,"title":"Orchard 1.5","description":"Please read our release notes for Orchard 1.5:\n[url:http://docs.orchardproject.net/Documentation/Orchard-1-5-Release-Notes]\n\n*Please* do not post questions as reviews. Questions should be posted in the Discussions tab, where they will usually get promptly responded to. If you post a question as a review, you will pollute the rating, and you won't get an answer.","creator":{"login":"orchardbot","id":11788683,"avatar_url":"https://avatars.githubusercontent.com/u/11788683?v=3","gravatar_id":"","url":"https://api.github.com/users/orchardbot","html_url":"https://github.com/orchardbot","followers_url":"https://api.github.com/users/orchardbot/followers","following_url":"https://api.github.com/users/orchardbot/following{/other_user}","gists_url":"https://api.github.com/users/orchardbot/gists{/gist_id}","starred_url":"https://api.github.com/users/orchardbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orchardbot/subscriptions","organizations_url":"https://api.github.com/users/orchardbot/orgs","repos_url":"https://api.github.com/users/orchardbot/repos","events_url":"https://api.github.com/users/orchardbot/events{/privacy}","received_events_url":"https://api.github.com/users/orchardbot/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":11,"state":"closed","created_at":"2015-04-13T19:41:10Z","updated_at":"2015-04-13T21:22:53Z","due_on":"2012-07-18T07:00:00Z","closed_at":"2015-04-13T19:41:10Z"},"comments":9,"created_at":"2012-03-14T10:49:34Z","updated_at":"2015-04-13T21:22:53Z","closed_at":"2015-04-13T21:22:53Z","body":"__AimOrchard__ created:\r\nhttps://orchard.codeplex.com/workitem/18561\r\n\r\nI'm unable to use Taxonomy at the moment as it is terrible slow.\r\n\r\nI digged a bit and noticed that it (in my case) generated around 11k queries : same amount of users I have.\r\n\r\nUsing a sql profiler I found out that this query is executed 11k times when processing a call to the following method:\r\n\r\n        public IEnumerable<TaxonomyPart> GetTaxonomies() {\r\n            return _contentManager.Query<TaxonomyPart>().List();\r\n        }\r\n\r\nQuery being executed:\r\n\r\n(@p0 int)SELECT this_.Id as Id609_0_, this_.UserId as UserId609_0_, this_.Role_id as Role3_609_0_ FROM Orchard_Roles_UserRolesPartRecord this_ WHERE this_.UserId = @p0\r\n\r\nI report it here, since I think this could be a core orchard issue?\r\n\r\nFor now, I had to disable the module again, since this way it is unusable."}}