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

  • Home
  • SEARCH
  • 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 9167653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:26:36+00:00 2026-06-17T15:26:36+00:00

I have several tables in my application in which the data is retrieving and

  • 0

I have several tables in my application in which the data is retrieving and tables updated dynamically. I noticed on the device, when on screens which had more cells than the screen could fit, so required a scroll, it would lag while scrolling.

I started going through my code line by line to find the problem until I finally found it

CachedImages *cache = [[CachedImages alloc] init];
                    UIColor *backgroundColour;
                    if([table getImage] != nil)
                    {
                        backgroundColour = [[UIColor alloc] initWithPatternImage:[cache getImageByPath:[[table getImage] getName]]];
                    }

cell.backgroundColor = [backgroundColour colorWithAlphaComponent:fOpacity];

(I have a table class which stores table info such as background image and data)

Its this line in particular

cell.backgroundColor = [backgroundColour colorWithAlphaComponent:fOpacity];

if I comment out that one line, the table scrolls perfectly, but when I uncomment it, it causes the lag issue. So in order round this, I set up a instance variable which stored the background colour for the table and removed the cached images code from the delegate methods, so it is loaded before the table is, so it doesn’t have to keep pulling it from cache everytime a cell needs redrawn.

This has mostly fixed the issue, when I first access the screen and scroll down, it is a bit laggy, but after the initial scroll to the bottom, the performance is fine. Is there anyway to prevent this initial lag, I have moved all the heavy rendering out of the delegate methods, but this image code is still causing a slight lag the first time the user enters the screen.

Any ideas on how to prevent this? The table is a custom table, and I is set up like this

  NSString *CellIdentifier = @"CustomCellIdentifier";
                    CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
                    if (cell == nil)
                    {
                        NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustomCellView" owner:self options:nil];
                        cell = [nib objectAtIndex:0];
                    }

So I am reusing the identifier.

Any suggestions would be much appreciated

  • 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-17T15:26:38+00:00Added an answer on June 17, 2026 at 3:26 pm

    Best solution I could come up with is preloading the image prior to the screen appearing, so it doesn’t have to keep fetching it from cache. This has mostly fixed the issue, the first time the screen loads there is a slight lag, but after that its smooth. Best solution I have found so far

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

Sidebar

Related Questions

I have a spring batch application which loads multiple files into several data tables.
Here's the setup: I have several tables that hold information for data objects which
I have several tables 1 contacts and multiple data. Contacts has an ID field
I have several tables that I am selecting data from. I am trying to
I have working website in PHP with a MySQL backend which has several tables
I have an OSX core data app (non-document based) with several tables. I'd like
I have created a web service which, querying a SQL Server, retrives several tables.
I have created one application which contains several buttons to home page clicking on
The root problem: I have an application which has been running for several months
I have several tables in my ERD which which I would like to combine

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.