nicklockwood / iCarousel

A simple, highly customisable, data-driven 3D carousel for iOS and Mac OS
http://www.charcoaldesign.co.uk/source/cocoa#icarousel
Other
12k stars 2.58k forks source link

carousel scrolls really slugglishly when alot of data is placed in it #244

Closed abrpatel closed 11 years ago

abrpatel commented 11 years ago

How can i make this faster. I'm placing an array of 60 items in the carousel.

Here are the settings.

iCarouselOptionWrap = yes

iCarouselOptionVisibleItems = 3

this is how i'm creating the views

UILabel *label = nil;

    //create new view if no view is available for recycling
    if (view == nil)
    {
        view = [[UIView alloc] initWithFrame:_frame];

        label = [[UILabel alloc] initWithFrame:_lablefFrame];
        label.textAlignment = UITextAlignmentCenter;

        [view addSubview:label];

    }
    else
    {
        label = [[view subviews] lastObject];
    }

    label.text = [_array objectAtIndex:index];

using Version 1.7.2.

It functions fine when i have a few items, but its really slow when this view with 50 items.

How can i make the scrolling faster.

nicklockwood commented 11 years ago

The number of items shouldn't make any difference to the performance if the iCarouselOptionVisibleItems is set at 3 - the example apps work fine with thousands of items.

Can you email your project to support at charcoaldesign dot co dot uk and I'll take a look at it?

abrpatel commented 11 years ago

It's weird. It's probably my implementation, as it functions properly on a test project I created to replicate the issue. I'll have to recode or tweak my implementation somehow to get it working.

Thanks. Sent from my iPhone

On Oct 8, 2012, at 5:34 PM, Nick Lockwood notifications@github.com wrote:

The number of items shouldn't make any difference to the performance if the iCarouselOptionVisibleItems is set at 3 - the example apps work fine with thousands of items.

Can you email your project to support at charcoaldesign dot co dot uk and I'll take a look at it?

— Reply to this email directly or view it on GitHub.