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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:42:44+00:00 2026-05-30T07:42:44+00:00

Application Specific Information: com.my-app failed to launch in time Elapsed total CPU time (seconds):

  • 0
Application Specific Information:
com.my-app failed to launch in time

Elapsed total CPU time (seconds): 20.090 (user 20.090, system 0.000), 100% CPU 
Elapsed application CPU time (seconds): 17.598, 87% CPU

I’ve made a modification to my app and as a result I now run a function from applicationDidFinishLaunching which will do some database processing.

I’m basically creating some new records and updating some existing ones.

For one of my existing beta testers / real customers, this is taking 20 seconds to complete.

Although in this case this is a one off, users could experience this situation if they haven’t used the app for a while.

Normally the process wouldn’t take long at all, as there would only be a few transactions to process.

I’m unsure how to proceed, any suggestions ?

  • 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-30T07:42:46+00:00Added an answer on May 30, 2026 at 7:42 am

    I suggest you to do your db processing in the background. Maybe you could disable the interface or display a waiting indicator while you are updating the db in the background thread. Then, once finished you could enable the interface or hide the indicator.

    There are different ways to create background thread.

    • Create a thread manually using NSThread class
    • Using NSOperation and NSOperationQueue classes
    • Using Grand Central Dispatch (GCD)

    Hope it helps.

    Edit

    Here simple code for your goal (following @JeremyP suggestion).

    First, create a NSOperation subclass

    // .h
    @interface YourOperation : NSOperation
    {   
    
    }
    
    //.m
    @implementation YourOperation
    
    // override main, note that init is executed in the same thread where you alloc-init this instance
    - (void)main
    {    
        // sorround the thread with a pool
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    
        // do your stuff here..
    
        // you could send a notification when you have finished to import your db,
        // the notification is sent in a background thread,
        // so in the place where you listen it, if you need to update the interface,
        // you need to do it in the main thread (e.g. performSelectorOnMainThread)
        [[NSNotificationCenter defaultCenter] postNotificationName:kImportComplete object:self];
    
        [pool drain];
        pool = nil;
    }
    

    Then, in your application delegate for example call [self import]; that could be defined as follow:

    if (!(self.operationQueue)) {
    
        NSOperationQueue* q = [[NSOperationQueue alloc] init];
        [q setMaxConcurrentOperationCount:1];
    
        self.operationQueue = q;    
        [q release];
    
        YourOperation *op = [[YourOperation alloc] init];
    
        [self.operationQueue addOperation:op];
        [op release], op = nil;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Application Specific Information: com.oneorangetree.iphoneexample failed to launch in time elapsed total CPU time (seconds):
I'm making a php web application which stores user specific information that is not
is web-inf/lib should contain only application specific jar's or deployment environment specific jar's also
Our application currently stores bunch of configuraton & application specific data to files on
Straighforward question really Wondering if there was an application specific for handling coldfusion log
Is there anyway I can use to destroy my deployed application at specific date?.
I have a specific Silverlight application, that is fed with data by a WCF-Service.
My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled
My application uses multiple windows I want to hide one specific window in case
My application requires events to be fired based on some specific activities that happen.

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.