Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8044783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:20:07+00:00 2026-06-05T05:20:07+00:00

I use a table view with relatively ‘heavy’ custom table view cells – say

  • 0

I use a table view with relatively ‘heavy’ custom table view cells – say there’s is around 100 subviews in a single cell (full hierarchy). Despite of that I’ve been able to reach very smooth scrolling – using standart practices like working only with opaque views, hiding unused subviews (or even removing from the view hierarchy), pre-loading cells height etc.

The problem is that it’s still relatively costly to create a single cell instance. Because of how the standard UITableView’s cell reusage logic works this problem is only noticeable in specific conditions.

Usually when table view is loaded (and intitial content is displayed) it creates almost all required cells instances – so when you start scrolling it rarely needs to create any more reusable cells. But if for some reason it only displays a few cells at the beginning it would obviously need to create more when scrolling is initiated. In my case this is noticeable if there’s a wide table view header or if first cells are big enough. When that happens once you start scrolling there’s a noticeable lag for a few moments which is clearly caused by new cell instances being created. Nothing really ugly but still noticeable especially compared to absolutely smooth scrolling after that.

Now the obvious solution for that would be to make cells ‘lighter’ – like break them into different more specific types so each can contain less subviews. But because of the way my content is organized that would be a very complex solution.

So my question is – is there any good way to ‘trick’ table view logic to force loading and caching of specific number of reusable cell instances right away – despite of the number of cells actually visible?

One of the options I’ve been thinking of is to have own explicit cache of cells and pre-populate it with cells when needed (say in -viewDidLoad). The problem I have with this approach is that you have to known exact type of cells you will need beforehand – doesn’t work well for me. The improvement would be to build cache when the initial data is loaded (so at least the exact type of content is known) but I’ve been wondering if there are any simple options.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:20:10+00:00Added an answer on June 5, 2026 at 5:20 am

    You can do it by adding your own “secondary cache” layer to your data source.

    When you initialize your data source, pre-create as many cells as needed, and put them into an array. When your dequeueReusableCellWithIdentifier fails, go for that array first, and take a cell from there. Once the array is exhausted, start creating new cells (if you create enough cells upfront, you shouldn’t need to create new ones on the fly: dequeuing will eventually stop failing when you have enough cells rotating in and out of visibility).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several parts in my app where I use custom table view cells.
I have some custom table view cells that takes a while to draw, so
A Closer Look at Table-View Cells from Apple, explains how to use The Technique
i use a table view with custom values and image. Every rows do this
I have a custom class that I use to build table strings. I would
I use UIViewController 's editButtonItem to control edit mode on my table view. The
Say I have NavigationController->Root[Table View Controller subclass] So from didSelectRowAtIndexPath of my Table View
i have a table view, in one condition i want to use an accessory
In my application there is a table view.What I want to do is when
I'd like to have all the rows on my table view use UITableViewCellAccessoryNone (e.g.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.