Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I wanted to share my /MacroPartial Custom Label code because I was able to greatly improve the performance of the admin by switching from calling the ContentService.GetById(key) for every option in the NuPicker, to using the Examine InternalIndexer instead. I was rendering 500+ items per NuPicker. Some doctypes had 2-3 NuPickers, and the real killer was putting a NuPicker in an Archetype datatype which let the admin users dynamically add as many as they wanted to the node! 10 pickers each loading 600+ options from the DB --> bad performance, even some locking of the web server.
IContent ic = ApplicationContext.Services.ContentService.GetById(Convert.ToInt32(Model.MacroParameters["key"]));
Thanks for sharing :) the ContentService hits the database, but how about using:
IPublishedContent content = UmbracoHelper.TypedContent(Convert.ToInt32(Model.MacroParameters["key"]))
This NuPicker options needs to include unpublished content, which AFAIK, there is no cached API to query, hence the Examine technique.
Arrh, all makes sense now.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted