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 6804909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:31:24+00:00 2026-05-26T19:31:24+00:00

My app takes screenshots. I have a main screen with a scroll view that

  • 0

My app takes screenshots. I have a main screen with a scroll view that lets you cycle through those snapshots. The problem is, the more snapshots I have, the slower that view runs. I can get about 15 snapshots in the scrollview before things get seriously laggy. The images i’m displaying are only 1/3 the size of the actual screenshot. Each screenshot is an UIImageView on a scrollview. Any thoughts on increasing performance here?

  • 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-05-26T19:31:25+00:00Added an answer on May 26, 2026 at 7:31 pm

    The best thing which you can do is to do lazy loading.
    Only load the images that are visible at that time on that view.
    Once you scroll the older images get released and the new one gets loaded.

    Two ways to load images:

    [UIImage imageNamed:fullFileName] // caches the image
    

    or:

    NSString *fileLocation = [[NSBundle mainBundle] pathForResource:fileName ofType:extension];
    NSData *imageData = [NSData dataWithContentsOfFile:fileLocation];
    [UIImage imageWithData:imageData];
    

    or, finally:

    [UIImage imageWithContentsOfFile:path] // does not cache the image
    

    Which solution is best depends on what you’re doing with the image. The imageNamed: method does cache the image, but in many cases that’s going to help with memory use. For example, if you load an image 10 times to display along with some text in a table view, UIImage will only keep a single representation of that image in memory instead of allocating 10 separate objects. On the other hand, if you have a very large image and you’re not re-using it, you might want to load the image from a data object to make sure it’s removed from memory when you’re done.

    If you don’t have any huge images, I wouldn’t worry about caching, so long as you’re using lazy loading. Unless you see a problem, I would choose less lines of code over negligible memory improvements.

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

Sidebar

Related Questions

I have a part of my app that takes a screenshot of a certain
I have a flex app that takes data from a back end database then
I've seen a few sites that have a flash app which takes video from
I have an app that takes a screenshot and the shares this with the
I am developing an Android app (see screenshots). I have a layout that looks
I am developing an Android app (see screenshots). I have a layout that looks
I am making app that takes a screenshot of a URL requested by the
I'm trying to create a WinForms app that takes a screenshot on a set
My silverlight app takes the user through a sort of wizard-like process, so for
I am making an app that takes photos from web site for some Username

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.