Unable to work with reusable cells. How can I optimize smooth scrolling in a tableView?

My app has a bunch of horizontal tableviews inside a regular vertical tableView.

Here's a picture to illustrate:

enter image description here

This results in pretty good horizontal scrolling, but that's more than I can tell for vertical scrolling. The vertical scroll is quite long. I know that each tableView will have its own reusable cells and therefore cannot be shared with other tables. This way, scrolling vertically will always instantiate the cells, or at least what I see.

So my question is how to optimize vertical scrolling without being reusable?

The horizontal cells are loaded with xib and are autoplayed. Each cell has at least ten sub-zones. There is not much mixing.

    [self.tableView registerNib:[UINib nibWithNibName:@"RATableViewCell" bundle:nil] forCellWithReuseIdentifier:TableViewCellIdentifier];

      

I know it’s hard for me to give me advice without further information, but I’m more interested in if the no-cell reuse situation changes any traditional optimization advice, such as using shouldRasterize or CoreGraphics.

+3


source to share


1 answer


If your performance is not good enough, profile to determine how long your script takes. Then, consider the issues in the profile information.

One of the reasons we have so many ways to be successful is because there are many solutions to different problems. Some solutions are better than others for the specific challenges we face. I could say that "10 views is worth a lot!" Then you can decrease the views and find that it doesn't do what is currently slower, faster (or just makes your program as fast as it used to be) but less supported / reusable). Another example: it -shouldRasterize

might work for you or against you. Depends on what is being done.



Even with CoreGraphics, you can often use multiple paths to get equivalent results. It depends more quickly on many things.

Good optimization at this stage is more about understanding your specific problems / bottlenecks and what makes your program slow, rather than sticking to best practices and the likelihood that they will solve problems in the program.

+1


source







All Articles