Thanks for the detailed info. I have compressed my javascript using the 
Google Closure compiler. The process has been very slow (20 min?), and the 
resulting javascript could not start-up. I am not sure what went wrong. I 
will take another go at this at the end of the week. The compression factor 
was around 50%. I will post detailed metrics once I get this working.

On Sunday, July 1, 2012 3:56:44 PM UTC+2, apexi.200sx 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>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
>>
>
>

Reply via email to