Re: Class loading problem - taking forever
Re: Class loading problem - taking forever
- Subject: Re: Class loading problem - taking forever
- From: Chuck Hill <email@hidden>
- Date: Tue, 10 Nov 2009 13:17:17 -0800
On Nov 10, 2009, at 7:20 AM, John Huss wrote:
I have an app that is taking an extremely long time to startup and
start responding to requests (5-10 minutes). It appears to be
spending a huge amount of time in
NSBundle.searchAllBundlesForClassWithName, which has the ominous
logging message:
"NSBundle.searchAllBundlesForClassWithName was invoked.
**This affects performance very badly.** "
What causes this method to be invoked? It seems to be called in
other apps that work fine so I'm not sure if this is important or not.
I don't think that message could be the cause of a 5-10 minute delay.
A delay that long sounds more like a static initializer block that is
timing out on something (connecting to a port?). Try and get a thread
dump while it is hung, that will likely point directly to the culprit.
For the time-being I've worked around the issue by calling
_NSUtilities.setClassForName for a bunch of classes, but I'm not
sure why this is necessary since I'm not doing that in other apps.
Are there other classes in the relevant bundle/jar that have static
initializers? Is this on the same or different machines? If
different, could be a block on some outgoing connection.
And in general this makes me think it would be better to do
_NSUtilities.setClassForName for everything in Wonder for instance -
if there is a performance (startup time) benefit.
That messages looks more normal than concerning to me
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