I am doing some complex linq querying and a lot of the queries rely on MNTP2.
After reading about Umbraco performance, I am concerned that I am doing a lot of comparisons using IPublishedContent vs just string ids for example. The idea being that every time an IPublishedContent is created, there is memory allocation to this. Instead of returning a list of IPublishedContent for MNTP2 is there a way to just get a comma delimited string back instead of a bunch of IPublishedContents?
For example, instead of this:
var blacklist = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("exclusionList")
I want something like:
var blacklist = Model.Content.GetPropertyValue<string>("exclusionList")
Multinode Treepicker 2 as string of ids
I am doing some complex linq querying and a lot of the queries rely on MNTP2.
After reading about Umbraco performance, I am concerned that I am doing a lot of comparisons using IPublishedContent vs just string ids for example. The idea being that every time an IPublishedContent is created, there is memory allocation to this. Instead of returning a list of IPublishedContent for MNTP2 is there a way to just get a comma delimited string back instead of a bunch of IPublishedContents?
For example, instead of this:
I want something like:
When I just use
<string>
I get:System.Collections.Generic.List`1[Umbraco.Core.Models.IPublishedContent] returned....
I have tried doing something like this:
But it defeats the purpose as the IPublishedContent is still created and persisted to memory.
Any thoughts appreciated.
Jamie
is working on a reply...