Hi,
first thing to do is check that your generated js files don't include
debugging code like stringified sources of origin python files. Just
that divides by 2 at least the size of your generated files.
regards,
PKL
Le 01/07/2012 16:02, Apexi 200sx a écrit :
Oh also forgot to mention you could try playing around with various
flags on pyjsbuild, as these can affect the size of the built app -
the switches have changed recently by C Anthony, but it might be worth
experimenting.
Let us know how you get on it may save other people some time and effort !
On Sun, Jul 1, 2012 at 2:56 PM, Apexi 200sx <apexi.20...@gmail.com
<mailto:apexi.20...@gmail.com>> wrote:
1) Yes, this is because all the JS code that is required to
emulate Python language functionality has to be included.like JS
implementations of List Dict Set etc.
2) Enable gzip compression on the web server that hosts you app,
this can give anything up to 1/10th the amount of data actually
being sent over the wire.
Also you could try JS compression library like Google's Closure
compiler.
https://developers.google.com/closure/compiler/
Under section "How do I start ?" at the bottom of the click
"Download the application"
Unzip to a folder
Set an evironment variable to point to the compiler...
e.g.
COMPILER=/home/me/google/compiler/compiler.jar
In the pyjs distribution there is a script in the contrib folder
called pyjscompressor.py
put this on your path and then you should be able to use this to
compress the JS in the monolithic pyjs .html it does this by
extracting the JS from within this file and creates temporary JS
files, and then running the google Closure compiler over them and
then building them back into the original .html once complete.
I think you just run pyjscompressor.py output - output being the
output directory where pyjsbuild places your app by default.
At the moment only the basic closure compiler optimizations work
as the pyjs generated code needs to be in a particular format to
get the advanced optimizations - this is something Kees is working on.
PS I have not tested all what I described it is just something I
have looked at since I found out that Kees was working on this
stuff !
On Sun, Jul 1, 2012 at 4:01 AM, Daniel Gonzalez
<gonva...@gmail.com <mailto:gonva...@gmail.com>> wrote:
Hi all,
Currently in my pyjamas application I
have Portal.safari.cache.html, which is 1.60MByte big. Two
questions:
1) Is this big size normal?
2) Is it possible to speed up loading of this big file? Any
ideas on how to do this?
Thanks,
Daniel