Re: [Pyobjc-dev] Re: 1.0?
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-06-20 18:36:49
|
On Wednesday, Jun 18, 2003, at 22:10 Europe/Amsterdam, Ronald Oussoren wrote: > > 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. It isn't. I saw no noticable improvement when switching to this method. I did think of an alternative: I've checked in a patch that adds an argument to the function that actually loads frameworks. This argument is a list of classnames. If a class is in the list it is assumed to be in the framework, and won't be subjected to an expensive lookup. This seems to help a little on my box. Please let me know if this is an improvement. Ronald |