Hi and now compare this to what Klaus suggested and ship only .pyc files: - no compiling - smaller package => less download time as well. Sounds like that would be the fastest one. Additionally no trouble with cleaning up these files. Remember all these locally compiled files would be "not owned by any package". Or we need to generate %ghost entries for all of them. Am Freitag, 17. Februar 2017, 12:56:24 schrieb Bernhard M. Wiedemann:
On 2017-02-17 11:14, Stephan Kulow wrote:
Why would we prefer every user compiling over us building once?
a) it is not the users but their machines compiling in %post or such
b) it is very fast
I did a quick benchmark on a 2.1GHz CPU via https://gist.github.com/bmwiedemann/2db103cda98d9c750ff27e3f92f67e37
which found that compiling 400000 lines or 14MB worth of python source files created 14MB .pyc files, within 1.6 seconds. Compressing those into a tar.xz of 2.7MB took 6.7s and uncompressing took 0.2 seconds.
Now, you might think that users save 1.4 seconds when uncompressing the precompiled .pyc files, but they also have to download them first, which makes it only be faster when they have download speeds of >2MByte/s per machine (=16MBit/s per machine) which unfortunately is not true everywhere, especially in Germany aka Internet-Neuland.
on slower CPUs the balance might be better for precompiling, though.
-- Regards Michael Calmer -------------------------------------------------------------------------- Michael Calmer SUSE LINUX GmbH, Maxfeldstr. 5, D-90409 Nuernberg T: +49 (0) 911 74053 0 F: +49 (0) 911 74053575 - e-mail: Michael.Calmer@suse.com -------------------------------------------------------------------------- SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org