Too many panorama items and kablamo

After adding 25 pano items and a pretty background (which worked wonderfully in the WP7 emulator) I sat back had a cup of tea then thought about trying it on a device.
Despite unloading pano items and loading pano item contents on demand, it seems the sheer number of pano items was enough to bring my app to its knees. Clearly the panorama control is not designed for 25 pano items but I write this as a warning for anyone who is only able to test on an emulator.
Also it may not blow up (by blow up I mean return to the phone menu, the debugger disconnecting and no errors logged) on the page with all these pano items on. Indeed it blew up on the next page down (temporarily cured by removing the background image which must have reduced the memory just enough to prolong the apps life for a few seconds – however some back presses later and kablamo again).
Make sure you keep an eye on these:

long deviceTotalMemory = (long)DeviceExtendedProperties.GetValue("DeviceTotalMemory") / 1024;

long applicationCurrentMemoryUsage = (long)DeviceExtendedProperties.GetValue("ApplicationCurrentMemoryUsage") / 1024;

long applicationPeakMemoryUsage = (long)DeviceExtendedProperties.GetValue("ApplicationPeakMemoryUsage") / 1024;


2 thoughts on “Too many panorama items and kablamo

  1. So do you think that you are simply running out of resources on the device.. That might explain the issue I am having too. Our app is currently loading the same images as the related website rather than images created specifcally for a mobile device. I guess the emulator has more resources to play with being that it is running as a VM on a much more powerful developer workstation.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s