Udostępnij za pośrednictwem


"Your feedback is important to us; please stay on the line..." [Improving Windows Phone 7 application performance is even easier with these LowProfileImageLoader and DeferredLoadListBox updates]

**

This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of dlaa.me.

See you there!

Comments

  • Anonymous
    March 03, 2011
    I think this says it all about the issue with Silverlight and also WP7: "tuning phone applications for optimum performance is an important task - and a challenging one!" Why is it so hard? I don't have to sprinkle BitmapCache selectively and thoughtfully all over my HTML to make it perform in IE9. I don't have to worry about two different threads (UI and Composition), or worry about which properties I animate, or shouldn't animate. How many poor-performing scrolling listboxes have you seen on for instance iPhone? I don't recall seeing any. Don't tell me all iPhone developers are awesome devs who just knows how to make things perform (I seriously doubt that). I mean... not even the Silverlight Toolkit guys can make a universal listbox that performs well on the phone. Then there is the ProgressBar that now has a "PerformanceProgressBar" in toolkit to address its issues. And then once again there's what this entire blogpost is about. I pledge you to forward the following question to the Silverlight and WinPhone team: Why is performance so hard? Why are you parsing so much responsibility onto the developer?

  • Anonymous
    March 03, 2011
    The comment has been removed

  • Anonymous
    March 03, 2011
    I'm with Morten here and I have big problems with performances of rendering engine in Silverlight on desktop! Can't event think about phone scenario. Clearly, Silverlight (WPF) rendering engine needs lots of improvements. MS needs to take very seriously rendering problems described into detail here: jeremiahmorrill.com/.../a-critical-deep-dive-into-the-wpf-rendering-system

  • Anonymous
    March 03, 2011
    Morten Nielsen and Danijel, I don't have sufficient experience with/knowledge of IE9 and iOS internals to provide a meaningful answer, but I'll definitely pass your feedback on to the appropriate folks. Thanks for sharing!

  • Anonymous
    March 03, 2011
    Colin E, Nope, I don't mind if you share those links - please go right ahead! :) I read both posts when you originally published them, but I'm going to read them again right now to refresh my memory.

  • Anonymous
    March 03, 2011
    The comment has been removed

  • Anonymous
    March 04, 2011
    Lovely, Many thanks for this. I am using the LowProfileImageLoader quite a lot here: http://bit.ly/hkTkxK

  • Anonymous
    March 04, 2011
    leitning.de, That looks very nice - thanks for sharing!

  • Anonymous
    March 05, 2011
    David, thanks for your classes and for the update specially. We did a little modification to the LowProfileImageLoader - when we are refreshing list data (list with apps, basically), we cancel all pending downloads because we don't need the old images, we need to load new images now. So when user changes the filter, he receives new images as soon as possible.

  • Anonymous
    March 06, 2011
    The comment has been removed

  • Anonymous
    March 06, 2011
    Morten Nielsen, the composition offers us a way to perform UI bound tasks that we don't really want affecting critical UI tasks. Having worked in this space for over 3 years (since Silverlight 1) I can say with 100% confidence that there are UI tasks that you want to be completely fluid and non-blocked. This offers us that ability... And in the future when we start getting more complex UI's where there will be great potential for UI blocking, this composition thread will be a godsend!!! There are great benefits to the composition thread!!!! And I look forward to a future where we'll be able to build apps with MULTIPLE-UI THREADS!!! That is something RIA developers/designers we need to work towards!!!

  • Anonymous
    March 08, 2011
    Alex S, Neat - thanks for sharing!

  • Anonymous
    March 08, 2011
    Colin E. and Morten Nielsen and John Mitas, I think this is a good conversation to have; no worries about "hijacking". :)

  • Anonymous
    March 09, 2011
    Thank you for your LowProfileImageLoader. But it is no way to remove image! It is no effect if I try to set null to LowProfileImageLoader.UriSource. Why you ignore this case (with null value property)?

  • Anonymous
    March 09, 2011
    Sergey Zwezdin, Believe it or not, nobody's ever requested that before! :) To be fair, the original scenario was for scrolling lists where image removal never happens. That said, what should work for you here is to set Image.Source to null (as I discuss doing above) whenever you want to clear out an image. Alternatively, you could just remove the Image element from the tree. However, this is a very reasonable thing to want to do, so I've added a note to look into this next time I do an update. Thanks for the feedback!

  • Anonymous
    April 26, 2011
    Very nice! The only thing I'd like to add is a property for LowProfileImageLoader that specifies a default image to use in the event of an error. For example images downloaded from the web when there is no network connection, I'd like to display a default / unknown "facebook like" generic image. That looks easy enough for me to do with a modified copy but it'd be nice if it was baked in in the event of any future upgrades.

  • Anonymous
    April 26, 2011
    Geoff, Thanks! And FYI that I've added your suggestion to my TODO list to consider for a future update. :)

  • Anonymous
    April 26, 2011
    Welcome... thank you. Turns out making that change was harder than I thought, at least for me, but perhaps I'll come back to later. The other thing that crossed my mind as an enhancement was an optional caching ability. In many cases the images won't be changing often and perhaps sometimes reading and writing them to/from isolated storage (when not "expired") might be more efficient and would allow for offline use.

  • Anonymous
    April 26, 2011
    Geoff, When you talk about caching, you start to get out of the simple scenario I was looking to help with. You might want to see if AgFx (http://agfx.codeplex.com/) would be relevant to what you're doing...

  • Anonymous
    May 17, 2012
    The comment has been removed

  • Anonymous
    May 17, 2012
    Raymen Scholten, Thanks for sharing!