python - pyobjc application load-time improvement -


i have built pyobjc app , found seems take long time load.

i've added logging measure time takes load each step. before getting apphelper.runeventloop() app took 10 seconds, sometime 20 seconds load.

the strip-down code looks this:

import objc objc.setverbose(debug) # debug flag true/false applicationview import applicationview applicationdelegate import applicationdelegate .... pyobjctools import apphelper apphelper.runeventloop() 

the applicationview , applicationdelegate custom modules implement cocoa application user interface , have many imports. think takes long time.

my questions are:

  1. if imports in imported modules affect load time, can add code there check if particular import yet or not, , load time?

  2. if want add splash screen, how can if worst case cannot make changes applicationview , applicationdelegate modules, , need wait them load.

get rid of imports in custom modules seem used when particular window (nswindowcontroller) loaded. because structure application nswindowcontroller, load main 1 in applicationdidload in applicationdelegate class subclass nsobject.


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -