Commits

David Euresti committed 4acd826

Fix slow import of AppHelper

Because AppKit now lazy loads all its modules, the 'from AppKit import *' at the beginning of this file was taking around 5 seconds on my machine.
The solution is to get rid of the import * and only import the stuff you need.

  • Participants
  • Parent commits 1720c8a

Comments (0)

Files changed (1)

File pyobjc-framework-Cocoa/Lib/PyObjCTools/AppHelper.py

 
 __all__ = ( 'runEventLoop', 'runConsoleEventLoop', 'stopEventLoop', 'endSheetMethod', 'callAfter', 'callLater' )
 
-from AppKit import *
-from Foundation import *
+from AppKit import (NSApp, NSRunAlertPanel, NSApplicationMain,
+                    NSApplicationDidFinishLaunchingNotification)
+from Foundation import (NSObject, NSRunLoop, NSTimer, NSDefaultRunLoopMode,
+                        NSNotificationCenter, NSLog, NSAutoreleasePool)
+
 import os
 import sys
 import traceback