• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EOModels occasionally loading too slowly?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOModels occasionally loading too slowly?


  • Subject: Re: EOModels occasionally loading too slowly?
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 4 Nov 2009 19:08:18 -0800


On Nov 4, 2009, at 6:14 PM, Paul Hoadley wrote:

On 05/11/2009, at 12:32 PM, Chuck Hill wrote:

On Nov 4, 2009, at 5:35 PM, Paul Hoadley wrote:

On 04/11/2009, at 10:47 PM, Mike Schrag wrote:

try putting your code in finishInitialization() -- that's roughly where migrations run.

On 05/11/2009, at 3:51 AM, Chuck Hill wrote:

Does adding this make any difference?

	public void finishInitialization() {
		NSBundle.frameworkBundles();
	}

I moved the EOF-touching code from didFinishLaunching() to finishInitialization(), and yes it does work. (It also appeared to work when I moved it to LSApplication's constructor (the class between Application and ERXApplication). I assume finishInitialization() is a better place for it, though?)

I would have thought its original place was better.

You mean you would have thought didFinishLaunching() was better?

Yes.

NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("finishInitialization", ERXConstant.NotificationClassArray), WOApplication.ApplicationWillFinishLaunchingNotification, null);

NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("didFinishLaunching", ERXConstant.NotificationClassArray), WOApplication.ApplicationDidFinishLaunchingNotification, null);

This is now launching _before_ Migrations. Where you had it originally is _after_ Migrations. And that looks a little too suspicious to be a coincidence. Do you have true for er.migration.migrateAtStartup in your configuration?

Mike, any ideas on this? I don't see anything in Migrations that makes me feel suspicious.



This method is called even _earlier_.

As a work-around, that seems to be what I need. As you noted elsewhere, the model loading seems to proceed asynchronously when I touch EOF in didFinishLaunching() (and, for all I know, it still is). Whether or not the launched failed seemed to be non- deterministic because of this—sometimes LogIn.allNotices() (the default page, and the second time EOF is touched) would be called before the model I needed had loaded, and sometimes after. In any case, I _assume_ that's what is going on, based on what I'm observing, because I'm really not familiar with the WO/Wonder code behind the start-up process.

The source is available. :-)


Thanks to both of you for sorting this out.

Somehow, I don't think it is exactly sorted out yet. It is just getting curiouser and curiouser.

Yeah. I guess I meant thanks for enabling me to at least get my app launching consistently. :-)


That is progress at least.


Chuck


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects








_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: EOModels occasionally loading too slowly?
      • From: Mike Schrag <email@hidden>
    • Re: EOModels occasionally loading too slowly?
      • From: Paul Hoadley <email@hidden>
References: 
 >EOModels occasionally loading too slowly? (From: Paul Hoadley <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Gennady Kushnir <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Paul Hoadley <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Chuck Hill <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Paul Hoadley <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Mike Schrag <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Paul Hoadley <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Chuck Hill <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Paul Hoadley <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Paul Hoadley <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Mike Schrag <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Paul Hoadley <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Mike Schrag <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Paul Hoadley <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Chuck Hill <email@hidden>)
 >Re: EOModels occasionally loading too slowly? (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: PROGRESS, now trying to deploy, get an immediate error, probably a missing resource(s)?
  • Next by Date: Re: Deploying App built with Eclipse - where did the .CMD go?
  • Previous by thread: Re: EOModels occasionally loading too slowly?
  • Next by thread: Re: EOModels occasionally loading too slowly?
  • Index(es):
    • Date
    • Thread