What iconObjects, and what does it do when you turn it into an IEnumerable?

And what does .iconID do when called? Is it a field or a property?

Those are the only 2 places I can see where it could go slow. You
could use a Stopwatch (system, diagnostics) to time the various bits.

On 10 Aug 2012, at 01:24, ric3kg <[email protected]> wrote:

> I have the following code:
>    foreach(Icon item in iconObjects)
>    {
>        iconList.Add(item.iconID); //iconID is a GUID string
>    }
>
> I'm finding 197 records. It takes ~10 seconds to execute the loop and
> populate the list. Any thoughts on improving the performance?
>
> I've tried:
>    iconList.AddRange(iconObjects.Select(y=> y.iconID))
> But it takes the same amount of time.
>
> Thanks,
> Rick
>
>
>
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/Performance-question-tp4656453.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to