Posts: 245
Joined: Nov 2012
Reputation:
7
Wimpie
Senior Member
Posts: 245
2017-07-02, 09:18
(This post was last modified: 2017-07-02, 09:23 by Wimpie.)
In root directory of my addon I see only the My_very_big_addon.py file of my addon (among other files).
In the \resources\lib directory I get after each run also .pyo files of .py files that live there.
How can I generate a My_very_big_addon.pyo file in the root dir?
Reason I ask this is that I have a very big addon that takes 8 seconds to start. Precompiling the addon (at install) would hopefully lower that time.
Add-on :
Bluray iso utils Rewrite of BR_iso_enhancements
Add-on :
BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Posts: 17,859
Joined: Jul 2011
Reputation:
371
2017-07-02, 09:20
(This post was last modified: 2017-07-02, 09:21 by Martijn.)
Create a very small service.py and move most of the code to another file.
Precompile is not recommended
Posts: 7,133
Joined: May 2011
Reputation:
381
IMO I'd take the long compile time as a sign to compartmentalize your code into modules. Forcing compiling seems like the wrong solution?
Sent from my SM-G935T
Posts: 245
Joined: Nov 2012
Reputation:
7
Wimpie
Senior Member
Posts: 245
Thanks all
I'll see if I can compartmentalize the addon.
Maybe it does/doesn't make a difference, I'll see...
Add-on :
Bluray iso utils Rewrite of BR_iso_enhancements
Add-on :
BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.