Re: [Pyobjc-dev] NSApplicationMain idiom: wish to standardize
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-03-22 16:46:16
|
On Friday, Mar 21, 2003, at 18:02 Europe/Amsterdam, Just van Rossum wrote: > >> (using a savagely butchered version of PyObjC, 'import >> AppKit' would use another 2 seconds if I hadn't build a mini module >> that exports all definitions I need from AppKit and Foundation). > > Does this mean we should revisit the idea of replacing the Cocoa > modules > with "lazy" module-like objects? If *you* are butchering up PyObjC that > should be a sign... I did this to investigate how much faster I could get the application without rewriting in Objective-C, which would not be worth it just for shaving a couple of seconds from the lauch-time. I wonder if there are a lot of problems where (re)writing in Objective-C instead of Python would be worthwile. That doesn't mean I'm not interested in speeding up PyObjC. I'm not much into import hacks, so how would one cause the creation of a custom module-like object when doing 'import AppKit'? Does this entrail creating an importhook, or is replacing sys.modules['AppKit'] from inside AppKit/__init__.py sufficient? Ronald |