iOS7: Multi-UITableview rendering lag

77 views Asked by At

I have a viewcontroller in a universal app which has 5 coloumns (UITableview). Initially I fetch data from CoreData and then categorise it in 5 NSArrays. After that I call all 5 UITableViews to reload via following code.

    [[NSOperationQueue mainQueue] addOperationWithBlock:^{
        [_tvLeftMost reloadData];
    }];
    [[NSOperationQueue mainQueue] addOperationWithBlock:^{
        [_tvLeft reloadData];
    }];
    [[NSOperationQueue mainQueue] addOperationWithBlock:^{
        [_tvCenter reloadData];
    }];
    [[NSOperationQueue mainQueue] addOperationWithBlock:^{
        [_tvRight reloadData];
    }];
    [[NSOperationQueue mainQueue] addOperationWithBlock:^{
        [_tvRightMost reloadData];
    }];

on both IOS7&8(iPAD3) the data is fetched in 0.5 secs. But reload tables takes 5 secs on iOS8 and 20+ secs on iOS7. The UITableView's cell are not complex and only involve a local UIImage & a UILabel. How can I decrease rendering time on iOS7?

1

There are 1 answers

2
Santu C On

Try to reload your UITableView in below way -

dispatch_async(dispatch_get_main_queue(), ^{
    [self.tableView reloadData];
});

If your UITableView load image from web url , then it must be async image loading. Please check this tutorial for async image loading.