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:
if imports in imported modules affect load time, can add code there check if particular import yet or not, , load time?
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
Post a Comment