On 13/12/2016 10:08 PM, Vlad K. wrote:
> On 2016-12-13 11:59, Kubilay Kocak wrote:
>> 
>> Note that they will be re-created on import unless one overrides
>> the default for the interpreter to produce these optimization
>> files.
> 
> Depends. Those modules are installed in a root owned directory, and
> the bytecode cache will get created only if you run (import is enough
> as you say) those modules as root, because the cache is written in
> the module package directory.
> 
> So pre-packaging the bytecode is a form of optimization, as the
> bytecode will be there when you run it as an unprivileged user.
> 
> 
> 

I left out "... if the thing you're running can write to site-packages"
because the second law of thermodynamics (or rather the proclivity of
python software and users to use root) basically guarantees that *if*
they can be generated, they eventually *will* be generated.

My main point was that if disk utilisation is something one wants to
minimise (at deployment), that one would need to be able to turn the
optimization knob off each time (or system-wide) and that that would be
a handy thing to know and do.

Said another way, even if we (FreeBSD) de-packaged optimization files
which we want to do, that that *by itself* that would only save package
repository size and bandwidth, not deployment size.

./koobs
_______________________________________________
freebsd-python@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"

Reply via email to