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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:39:10+00:00 2026-05-14T23:39:10+00:00

My app takes too much time to loading. So I put a NSLog in

  • 0

My app takes too much time to loading.
So I put a NSLog in main() function like this to measure loading time from first:

int main(int argc, char *argv[]) 
{    
    NSLog(@"main");

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    [pool release];
    return retVal;
}

But, the log displayed at really later time.
Default.png displayed about 5 seconds, all loading process completed in 1~2 seconds after log appeared.

What’s happening before executing main() function on iPhone app?

  • 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-14T23:39:11+00:00Added an answer on May 14, 2026 at 11:39 pm

    The entry point of a binary is not main(), but start. This is true for most binaries compiled with gcc. When there are static variable constructors in C++, or functions with __attribute__((constructor)) attribute, or +load methods, they will be run before main().

    Some code will run even before start, because of dynamic linking. The dyld is responsible for this. All undefined external symbols are filled in at this point. And of course, the initializers of these libraries will execute.

    The Default.png is shown by SpringBoard, and is not controlled by your app. Thus there can be a time delay between the Default.png is shown, and code is actually running.

    These actions, however, are fast. The delay is more likely introduced by attaching to the remote gdb and Xcode.

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

Sidebar

Related Questions

My silverlight app takes the user through a sort of wizard-like process, so for
I've seen a few sites that have a flash app which takes video from
Im making a PyQt4 app which calls Imagemagick and ffmpeg, but it takes too
I want to write an app that takes in a model filename via cmd
We have lots of logging calls in our app. Our logger takes a System.Type
Something easy like CI (this means mandatory good, easy, up to date documentation). But
My app takes incredibly long to load, and I have no idea why. To
Does anyone have an XSLT that will take the app.config and render it into
I really want to be able to have a way to take an app
Take a .Net Winforms App.. mix in a flakey wireless network connection, stir with

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.