[Bf-committers] cache python scripts for re-distribution.

Campbell Barton ideasman42 at gmail.com
Wed Oct 5 07:46:53 CEST 2011


it adds 4mb (zipped), thinking about this and its really only a
problem for the windows installer, every other type package the user
has write access to blender scripts dir.

generating the pyc files could be added into the installer script so
the download size wont be increased.

On Wed, Oct 5, 2011 at 12:10 PM, Martin Poirier <theeth at yahoo.com> wrote:
> How bigger would it make the release package?
>
> What's the stance on distribution cache files from the Python folks? Is this something that will come to bite us in the ass later?
>
>
> Martin
>
>
>
> ________________________________
> From: Campbell Barton <ideasman42 at gmail.com>
> To: bf-blender developers <bf-committers at blender.org>
> Sent: Tuesday, October 4, 2011 8:10:47 PM
> Subject: [Bf-committers] cache python scripts for re-distribution.
>
> At the moment we're not caching scripts for packages we re-distribute
> on blender.org.
>
> For most cases its not all that bad, blender just takes a little
> longer to startup for the first time + a few ms longer to access lazy
> loading modules for the first time.
>
> Worst case is the user who runs blender hasn't got write permissions
> to the directories blender is installed in so blender will always have
> to parse the scripts rather then accessing __pycache__ dirs.
>
> Overall I realize this isn't a big deal but its pretty easy to do this
> so we might as well IMHO.
>
>
> Some quick time checks.
>
> Warm Start:
> * with cache: 0.471s
> * without cache: 0.945s
>
> Cold start:
> * with cache: 6.372s
> * without cache: 7.391s
>
>
> I've added a simple script which compiles scripts blender uses, run
> using this command:
>   blender.bin --background --python source/tools/compile_scripts.py
>
>
> The question is when should this run?, since scons is used for release
> perhaps this should be part of the packaging process?
>
> --
> - Campbell
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>



-- 
- Campbell


More information about the Bf-committers mailing list