Issues

Issue #2 resolved

Faster metadata support

Ronald Oussoren
repo owner created an issue

I'm working on speeding up our metadata support ("manually" loading information about constants, variables, functions and special methods).

Two major todo's w.r.t. that:

Add the new init.py code to framework wrappers other than

pyobjc-framework-Cocoa

Implement the "old" init support functions on top of the new

ones to ensure that we don't break wrappers created by third parties

Comments (5)

  1. Ronald Oussoren reporter

    The lazy loader should be transparent if you use PyObjC's framework wrappers, and needs work if you want to wrap other frameworks. The currently is no documentation on how to create compiled wrappers, that's high on my TODO list.

    If you are only using framework wrappers: make sure you do not use "from Foundation import ", use "import Foundation" or "from Foundation import NSObject" instead. Someone recently noticed that the "from ... import " form is currently much slower than it used to be, due to the way the PyObjC lazy loader is implemented. I'm working on a fix for that, but even with the fix explicit imports will be better because they perform less form (because explicit imports don't have to resolve the symbols you don't use).

  2. AcclivityNYC

    hi,

    We just changed in our 360 files of pyobjc code. The from Foundation import * to import Foundation (and called then Foundation.NSObject). Same think for AppKit, WebKit, AddressBook.

    Our app now opens in less then 1 second, instead of 8 seconds.

    Before we were using PyObjc 2.2 and load time was about 2 seconds.

    best

    Marc

  3. Log in to comment