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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:14:56+00:00 2026-05-26T14:14:56+00:00

After simply recompiling our iPhone application on newly released iOS 5.0 SDK i faced

  • 0

After simply recompiling our iPhone application on newly released iOS 5.0 SDK i faced strange problem – all UIImage:imageNamed (first call with actual image loading) and UIImage:imageWithContentsOfFile started to work 10 times slower than before. i managed to narrow problem down: this is the case only for jpeg and png files (not gifs!) and this is not because of file size. even straightforward loading of small 32*32 png takes around 300ms… compared to 30ms on older devices (checked on 3.1 and 4.3.5 with the exact same code)

i also tried to load image via newly introduced CIImage with this code

WLLog(@"Data loading...");
NSData *imageData = [NSData dataWithContentsOfFile:path];
WLLog(@"CIImage creation...");
CIImage* cii = [CIImage imageWithData:imageData];
WLLog(@"CIImage creation ok...");
float scle = 1.0;
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
    scle = [[UIScreen mainScreen] scale];
}
#endif
CIContext *context = [CIContext contextWithOptions:nil];
UIImage* res5 = [[UIImage alloc] init];
WLLog(@"UIImage creation...");
[res5 initWithCGImage:[context createCGImage:cii fromRect:cii.extent] scale:scle orientation:UIImageOrientationUp];
WLLog(@"Done!");

without any luck… this single line

CIImage* cii = [CIImage imageWithData:imageData];

takes the same 300ms even on small images (4Kb png). imho, there is simple nothing to parse at all!

Is there anything to resolve such strange change in loading times? For now it looks like something changed drastically in sdk internals 🙁

  • 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-26T14:14:57+00:00Added an answer on May 26, 2026 at 2:14 pm

    I had the same problem and it took me a few hours to find out what went wrong. Our two situations seemed to be exactly the same: An old project that didn’t run very well on iOS5 any more.

    So I took Instrument’s Time Profiler and dug into the depth of my app only to find out that every time the app hung it actually was in the process of opening PNG files for UIImageViews, just like you found out as well.
    But other apps I wrote don’t have this problem, and I did everything the same way. So judging by what you experienced and that my other apps were running fine, I figured it must have something to do with the PNG files themselves. And guess what, it turned out that I was right.

    So I sat down and wrote a script that piped all PNG files through ImageMagick’s convert to make TGAs out of them, then deleted the PNGs (just for good measure) and then converted the temporary TGAs back to PNG files. That way I made sure that they were not only NOT created by Photoshop any more, but also completely rewritten.

    That did the trick. Everything runs smoothly now, just as it did on iOS 3 and 4.

    I’m not sure if it had something to do with Photoshop. Other apps I recently did work fine with PNGs made with Photoshop. So maybe it was the version of Photoshop I used pretty much exactly a year ago to create those PNGs in the first place.

    Or maybe simply overwriting the old image files were enough, I’m not sure. But now it runs just fine.

    I hope this helps!

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

Sidebar

Related Questions

This might sound silly, but my umbraco 5.1 application (after upgrading from 5.0) simply
I am developing a simple web page to be viewed after an iphone application
I simply cannot wrap my head around how to solve this problem and after
After being troubled by an issue that I simply did not have the knowledge
Simply put, I'm getting this error in the Product Admin of Magento after adding
I am having a problem where, after performing a simple mathematical operation on the
Well, I was able to simply enough (after about an hour of googling) implement
I simply want to retrieve data asynchronously, and after retrieving the data, show it
I understand that after Android 3 menu buttons are not supported. So, I simply
I want to scale an image after rotating it using CGAffineTransformMakeRotation. When I simply

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.