Monday, November 22, 2010

PivotViewer, shared images and memory problems

I've spent a large chunk of the last weekend playing with the Silverlight PivotViewer from Microsoft.

It's lovely!

Despite the official upper limit on number of items being "3000", I've taken it up as high as 73000 items now - the animations don't work at that level, but the pivotviewer is very very useful there!

You can see some screenshots (attached hopefully!) and there's also one "live" demo on

The only downside - there have been a few issues I've had - one of the key ones of which is:
  • if you create a .cxml collection in which items don't each have unique images (e.g. they share a default image) then the Silverlight control does something odd - it somehow seems to try to duplicate the shared images and uses up lots of CPU and memory as a result.
This bug is reported in a bit more detail on this thread -

To recap:

  • the bug is for collections where <Item>s share img references.
  • if I load up one of these collections in the standalone viewer these work fine
    - the load is smooth and the memory use is expected.
  • if I load up the same collection in the silverlight pivotviewer then the items with shared images
    take a long time to display (they pop into the display one by one) and the memory use is higher
    - it increases with each image loaded.

You can just about see this effect if you watch the swimmer icons when you first load up:

The effect is really really noticable when you get to larger data sets

No comments:

Post a Comment