Re: [Pyobjc-dev] Re: 1.0?
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-06-18 20:12:05
|
On Wednesday, Jun 18, 2003, at 21:55 Europe/Amsterdam, Jack Jansen wrote: > > On woensdag, jun 18, 2003, at 20:21 Europe/Amsterdam, Ronald Oussoren > wrote: >> We already build minimally initialized classes, the problem is that >> [NSBundle bundleForClass:] seems to be very expensive. That is at >> least what I remembered from the previous time this came up, I think >> bundleForClass did a lot of I/O for every class we look at. At the >> time there were more important issues, but I think this is the major >> technical issue with the bridge at the moment. > > How many bundles are we talking about, usually? Cocoa and the main > application bundle? If so, then could we keep those two handy, and use > [bundle classNamed: xxx] as a quick test to see whether the class is > in there? > > That does assume that classNamed: is cheaper than bundleForClass:. It is worth testing if classNamed: is cheaper. If it is cheaper we can use this method instead of bundleForClass. > > I just saw that the NSBundleDidLoadNotification gives you the names of > all classes from the bundle. I think this won't help us because it > won't help us if the bundle was loaded before our stuff was > initialized, right? I don't think that the noficiation is usefull, because of the limitation you mentioned. Ronald |