On Tuesday, July 3, 2012 8:32:51 PM UTC+1, C Anthony Risinger wrote:
>
> On Mon, Jul 2, 2012 at 2:18 AM, Daniel Gonzalez wrote: 
> > 
> > I have taken a look at both pyjsbuild and pyjscompile. They are both 
> small 
> > scripts importing pyjs/pyjs/src/pyjs/browser.py. If I am not mistaken, 
> this 
> > is where the options are parsed, but I see no specific option to 
> optimize 
> > the size of the generated javascript. 
> > 
> > @Anthony: do you remember which flags are useful for this? 
>
> i personally don't like the monolothic build at all, and IMO the 
> dynamic link should be the default.  monolithic means that any change 
> -- even a single char -- *anywhere* in your app results in the client 
> downloading the full multi-MiB app in entirety. 
>
> --dynamic-link allows only the changed modules to be re-downloaded, 
> while all others are cached.  with some tricks, you can also achieve 
> cross-domain caching. 
>
> i personally would use: 
>
> --enable-strict --disable-debug --dynamic-link 
>
> ... at the minimum.  the first enables maximum python compat, the 
> second disables anything considered debug (even stuff enabled by 
> strict! this was the motivation for changes in option parsing), and 
> the third links modules by <script> tags instead of copying them into 
> the *cache.html files. 
>
> i haven't tried the ompressor stuff yet, but the <script> loaded 
> modules are pure JS, and i think should be compressible as-is. 
>
> -- 
>
> C Anthony 
>

I noticed the --enable-strict tag increases the size by a noticable amount, 
if our application works without it shouldn't we leave it off?

Also I made a modified version of 
pyjscompressor.py<https://github.com/pyjs/pyjs/blob/master/contrib/pyjscompressor.py>which
 lets it work on windows, would it be useful to contribute this? (i'm 
new to all this development stuff)
 
 

-- 



Reply via email to