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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -