{"action":"created","issue":{"url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/105","labels_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/105/comments","events_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/105/events","html_url":"https://github.com/leekelleher/umbraco-ditto/issues/105","id":98846728,"number":105,"title":"Review performance of custom ValueResolvers","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":[{"url":"https://api.github.com/repos/leekelleher/umbraco-ditto/labels/optimization","name":"optimization","color":"84b6eb"},{"url":"https://api.github.com/repos/leekelleher/umbraco-ditto/labels/testing","name":"testing","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-03T22:00:43Z","updated_at":"2015-08-04T08:13:12Z","closed_at":null,"body":"Looking at the unit-tests durations on a recent AppVeyor build...\r\n\r\nhttps://ci.appveyor.com/project/leekelleher/umbraco-ditto/build/0.8.0.320/tests\r\n\r\n...some of the unit-tests take a while to run.  I had a cursory check of the longer duration tests, and the models that are used in those tests are using some form of custom ValueResolver.\r\n\r\nThe 2 longer running ones are:\r\n\r\n* `AppSettingsTests.AppSetting_Property_Returned()` - uses `AppSettingValueResolver`\r\n* `PublishedContentTests.Complex_Property_Convertered()` - uses an ad-hoc one called `NameValueResovler` (sic)\r\n\r\nCurrently this is still a gut feeling, but I wanted to flag it on here."},"comment":{"url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/comments/127516376","html_url":"https://github.com/leekelleher/umbraco-ditto/issues/105#issuecomment-127516376","issue_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/105","id":127516376,"user":{"login":"JimBobSquarePants","id":385879,"avatar_url":"https://avatars.githubusercontent.com/u/385879?v=3","gravatar_id":"","url":"https://api.github.com/users/JimBobSquarePants","html_url":"https://github.com/JimBobSquarePants","followers_url":"https://api.github.com/users/JimBobSquarePants/followers","following_url":"https://api.github.com/users/JimBobSquarePants/following{/other_user}","gists_url":"https://api.github.com/users/JimBobSquarePants/gists{/gist_id}","starred_url":"https://api.github.com/users/JimBobSquarePants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JimBobSquarePants/subscriptions","organizations_url":"https://api.github.com/users/JimBobSquarePants/orgs","repos_url":"https://api.github.com/users/JimBobSquarePants/repos","events_url":"https://api.github.com/users/JimBobSquarePants/events{/privacy}","received_events_url":"https://api.github.com/users/JimBobSquarePants/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T08:13:12Z","updated_at":"2015-08-04T08:13:12Z","body":"Interesting... Looking at the [DisposableTimer](https://github.com/umbraco/Umbraco-CMS/blob/a3d4ccc062b94859e446b1206bf21f334577a35c/src/Umbraco.Core/DisposableTimer.cs) code it seems to run all the time regardless of what mode you are in. I wonder whether we should only run it on debug?\r\n\r\n[Complex](https://github.com/leekelleher/umbraco-ditto/blob/104dede81677d435d9f415c37bb03d7109e67634/tests/Our.Umbraco.Ditto.Tests/Models/ComplexModel.cs#L23) model contains an AppSettings value resolver so that's probably gonna be causing any delay there also.  I'll run the tests here to see what values I get. "}}