{"action":"created","issue":{"url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/202","repository_url":"https://api.github.com/repos/leekelleher/umbraco-ditto","labels_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/202/comments","events_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/202/events","html_url":"https://github.com/leekelleher/umbraco-ditto/issues/202","id":201545969,"number":202,"title":"Ditto Factory misusing `PluginManager.ResolveTypes`?","user":{"login":"leekelleher","id":209066,"avatar_url":"https://avatars.githubusercontent.com/u/209066?v=3","gravatar_id":"","url":"https://api.github.com/users/leekelleher","html_url":"https://github.com/leekelleher","followers_url":"https://api.github.com/users/leekelleher/followers","following_url":"https://api.github.com/users/leekelleher/following{/other_user}","gists_url":"https://api.github.com/users/leekelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/leekelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leekelleher/subscriptions","organizations_url":"https://api.github.com/users/leekelleher/orgs","repos_url":"https://api.github.com/users/leekelleher/repos","events_url":"https://api.github.com/users/leekelleher/events{/privacy}","received_events_url":"https://api.github.com/users/leekelleher/received_events","type":"User","site_admin":false},"labels":[{"id":219083453,"url":"https://api.github.com/repos/leekelleher/umbraco-ditto/labels/rfc","name":"rfc","color":"cc317c","default":false},{"id":219082517,"url":"https://api.github.com/repos/leekelleher/umbraco-ditto/labels/umbraco","name":"umbraco","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":{"login":"leekelleher","id":209066,"avatar_url":"https://avatars.githubusercontent.com/u/209066?v=3","gravatar_id":"","url":"https://api.github.com/users/leekelleher","html_url":"https://github.com/leekelleher","followers_url":"https://api.github.com/users/leekelleher/followers","following_url":"https://api.github.com/users/leekelleher/following{/other_user}","gists_url":"https://api.github.com/users/leekelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/leekelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leekelleher/subscriptions","organizations_url":"https://api.github.com/users/leekelleher/orgs","repos_url":"https://api.github.com/users/leekelleher/repos","events_url":"https://api.github.com/users/leekelleher/events{/privacy}","received_events_url":"https://api.github.com/users/leekelleher/received_events","type":"User","site_admin":false},"assignees":[{"login":"leekelleher","id":209066,"avatar_url":"https://avatars.githubusercontent.com/u/209066?v=3","gravatar_id":"","url":"https://api.github.com/users/leekelleher","html_url":"https://github.com/leekelleher","followers_url":"https://api.github.com/users/leekelleher/followers","following_url":"https://api.github.com/users/leekelleher/following{/other_user}","gists_url":"https://api.github.com/users/leekelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/leekelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leekelleher/subscriptions","organizations_url":"https://api.github.com/users/leekelleher/orgs","repos_url":"https://api.github.com/users/leekelleher/repos","events_url":"https://api.github.com/users/leekelleher/events{/privacy}","received_events_url":"https://api.github.com/users/leekelleher/received_events","type":"User","site_admin":false},{"login":"mattbrailsford","id":527305,"avatar_url":"https://avatars.githubusercontent.com/u/527305?v=3","gravatar_id":"","url":"https://api.github.com/users/mattbrailsford","html_url":"https://github.com/mattbrailsford","followers_url":"https://api.github.com/users/mattbrailsford/followers","following_url":"https://api.github.com/users/mattbrailsford/following{/other_user}","gists_url":"https://api.github.com/users/mattbrailsford/gists{/gist_id}","starred_url":"https://api.github.com/users/mattbrailsford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattbrailsford/subscriptions","organizations_url":"https://api.github.com/users/mattbrailsford/orgs","repos_url":"https://api.github.com/users/mattbrailsford/repos","events_url":"https://api.github.com/users/mattbrailsford/events{/privacy}","received_events_url":"https://api.github.com/users/mattbrailsford/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-01-18T11:22:15Z","updated_at":"2017-01-18T11:39:58Z","closed_at":null,"body":"Something came out of a recent Umbraco support ticket, that our logs were filled with `Umbraco.Core.PluginManager` entries.  Which @Shazwazza raised this question...\r\n\r\n> Why is `PluginManager.ResolveTypes` being used so much? The reason your logs are full of this is because it shouldn't be used this way, types should be resolved one time per type in your application, please consider updating your code to only resolve once otherwise you will end up type loading using reflection all of the time and filling up your logs.\r\n\r\nIt turns out that Ditto Factory is making that call... [`DittoFactoryAttribute.cs` line 45](https://github.com/leekelleher/umbraco-ditto/blob/0.10.0/src/Our.Umbraco.Ditto/ComponentModel/Processors/DittoFactoryAttribute.cs#L45).\r\n\r\nI can see why we're calling `ResolveTypes` from within the factory, but wondering if there's a better way to rectify this?"},"comment":{"url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/comments/273454095","html_url":"https://github.com/leekelleher/umbraco-ditto/issues/202#issuecomment-273454095","issue_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/202","id":273454095,"user":{"login":"leekelleher","id":209066,"avatar_url":"https://avatars.githubusercontent.com/u/209066?v=3","gravatar_id":"","url":"https://api.github.com/users/leekelleher","html_url":"https://github.com/leekelleher","followers_url":"https://api.github.com/users/leekelleher/followers","following_url":"https://api.github.com/users/leekelleher/following{/other_user}","gists_url":"https://api.github.com/users/leekelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/leekelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leekelleher/subscriptions","organizations_url":"https://api.github.com/users/leekelleher/orgs","repos_url":"https://api.github.com/users/leekelleher/repos","events_url":"https://api.github.com/users/leekelleher/events{/privacy}","received_events_url":"https://api.github.com/users/leekelleher/received_events","type":"User","site_admin":false},"created_at":"2017-01-18T11:39:58Z","updated_at":"2017-01-18T11:39:58Z","body":"Oops! I've just noticed the `AllowedTypes` property... which will work around my specific issue.\r\n\r\n_Making a note to make this more prominent in our upcoming documentation._"}}
{"actor":{"display_login":"leekelleher"}}