0

There is a method in Watchkit extension which displays the items in the tableview. There are around 500+ items and the memory increases from 2.9mb to 7.8mb and the watch app crashes. The method is as follows:

[_timeTable setNumberOfRows:timeCardArray.count withRowType:kWDTimeRow];
[timeCardArray enumerateObjectsUsingBlock:^(WDTime *timeCard, NSUInteger index, BOOL *stop) {
    WDTimeRowController *timeRow = [_timeTable rowControllerAtIndex:index];
    [timeRow configureWithData:timeCard delegate:self atIndex:index];
}];

Further in the device log, I can see this message "watchkitapp failed to scene-update in time"

How to fix this crash? Is it caused by memory or the large waiting time for 500 items to load in watch tableview?

Ganesh Nayak
  • 802
  • 11
  • 38

1 Answers1

0

I think it is not a good practice to set a base class as a delegate of a cell because you aren’t managing the allocating or deallocating of the Cell class. In other hand you should think that the AW was not made to handle a great bunch of data, so you should optimise your code to show to the user just the most important data to reduce the hight memory usage and improve the User experience

CarlosGz
  • 396
  • 2
  • 6