PDA

View Full Version : [OPEN] [CLOSED] Ext.Carousel crashes safari consistently with many items on the iPad



podman
29 Jul 2010, 2:42 PM
I'm trying to load up a carousel with a lot of images but it seems to crash every time I swipe for a while. This is replicable with a very simple example:


Ext.setup({
onReady: function() {
var carousel = new Ext.Carousel({
indicator: false,
items: [
{html: '<div style="width:100%;height:600px"><h1>TEST</h1></div>'},
{html: '<div style="width:100%;height:600px"><h1>TEST</h1></div>'}
/* repeat this a couple hundred times */
]
});

new Ext.Panel({
fullscreen: true,
items: [carousel]
});
});

If I swipe to the next item over and over again fairly quickly, safari will eventually crash. This doesn't happen on the iPhone or in the xCode iPad simulator only on the iPad itself.

I recorded some video of this code crashing first the OS:
http://sproutvideo.com/videos/1c98d2bb1f1ce3ce94

and then mobile safari:
http://sproutvideo.com/videos/4898d2bb1f1ce4c0c0

Anyone have any ideas as to what might be causing this or what I can do to fix it?

Jamie Avins
29 Jul 2010, 2:53 PM
The new carousel in 0.93 was specifically redesigned to allow better dynamic addition and removal from the carousel. Currently it's up to developer to balance how many items to keep in memory at once. We expect to add some ability to automatically add and remove in some fashion in the future.

nosarious
11 Aug 2010, 1:40 PM
I've noticed a significant pause when going through cards on the carousel. I only have five, but they have text laid out in specific boxes, and images that change the background when clicked.

Five is sbout the maximum I would like to have 'read' in memory and use at any time (preparing the layout of the card just two away from the one being viewed) is there a sample of how I should be doing this somewhere?

(I am using a second generation ipod touch. the system as it stands works well on an ipad and iphone)

Jamie Avins
12 Aug 2010, 9:06 AM
The carousel is getting a few more tweaks in the next release and the ShopStyle app uses it extensively. If you start a new thread with a complete test case we can take a look at the issue. Please be sure to include the iOS version when dealing with the 2nd gen touch as iOS4 has been a disaster on that hardware.