You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kristian Marinkovic <kr...@gmail.com> on 2014/01/13 21:29:50 UTC

Tapestry 5.4-beta-2 GoogleClosureCompiler

Hi all,

how do i set additional GoogleClosureMinimizer options? The current
implementation in tapestry-webresources doesn't seem to offer any
configuration possibilities besides replacing the whole service.

cheers,
Kris

Re: Tapestry 5.4-beta-2 GoogleClosureCompiler

Posted by Kristian Marinkovic <kr...@gmail.com>.
+1 to that.

Btw. I just realized that the ETag value is double quoted (""56633""). Is
that on purpose?
 Am 21.01.2014 02:28 schrieb "Howard Lewis Ship" <hl...@gmail.com>:

> That's an interesting trade-off: bandwidth (gzip better) vs. cost of
> unzipping (gzip worse). Good thing Tapestry does a good job of letting the
> client cache the assets!
>
>
> On Sun, Jan 19, 2014 at 1:04 AM, Kristian Marinkovic <
> kristian.marinkovic@gmail.com> wrote:
>
> > Thank you for all your responses and references.
> >
> > What i want to activate is the SIMPLE_OPTIMIZATIONS level that activates
> > whitespace removal and renaming (shortening) of variables and functions.
> my
> > webapp is getting used more by mobile clients (tablets, phonse) than
> > desktop clients. during testing and optimization i realized that the form
> > of the js -  eg. whitespaces - has an impact on the execution
> performance.
> > gzip does a great job in shrinking the file sizes but unzipping on a
> mobile
> > client has a performance toll which is noticeable on app startup leaving
> > the user with the perception the app were slow.
> >
> > cheers,
> > Kris
> >
> >
> > On Fri, Jan 17, 2014 at 8:46 PM, Howard Lewis Ship <hl...@gmail.com>
> > wrote:
> >
> > > That said, in a HTTP 2.0 world, there isn't such an advantage to
> > > aggregation, especially with Tapestry's asset URLs (e.g., the encoding
> of
> > > the content hash into the URL).
> > >
> > >
> > > On Fri, Jan 17, 2014 at 11:45 AM, Howard Lewis Ship <hlship@gmail.com
> > > >wrote:
> > >
> > > > Google Closure is best in a situation where *all* the JavaScript that
> > > will
> > > > be part of the page is known statically; it goes beyond other
> > minimizers
> > > in
> > > > that, if you follow certain rules, it can perform real optimizations,
> > > such
> > > > as dead-code analysis and function inlining.  It can work with a
> couple
> > > of
> > > > stable libraries outside its domain, as long as you tell it about
> them,
> > > but
> > > > doesn't fit well with non-aggregated modules loading dynamically ...
> > that
> > > > defeats dead-code analysis, etc.
> > > >
> > > >
> > > > On Fri, Jan 17, 2014 at 3:06 AM, Thiago H de Paula Figueiredo <
> > > > thiagohp@gmail.com> wrote:
> > > >
> > > >> On Fri, 17 Jan 2014 07:12:14 -0200, Massimo Lusetti <
> > mlusetti@gmail.com
> > > >
> > > >> wrote:
> > > >>
> > > >>  BTW as a side note I'm not completely sure all these minimization
> and
> > > >>> concatenation are a good thing. Let's think about this a little bit
> > > more.
> > > >>>
> > > >>> Some resources may help:
> > > >>>
> > > >>> http://rubyrogues.com/135-rr-http-2-0-with-ilya-grigorik/
> > > >>>
> > > >>
> > > >> From Wikipedia: "HTTP 2.0 is the next planned version of the HTTP
> > > network
> > > >> protocol used by the World Wide Web.". That'll take some time until
> we
> > > can
> > > >> really assume most users are using it, maybe years. Regarding large
> > > files,
> > > >> I think that if you manage to make the browser cache the files and
> you
> > > >> don't change them much, that won't be a problem. Tapestry, with
> > stacks,
> > > >> let's you choose what JS and CSS files will be bundled together.
> And,
> > of
> > > >> course, JavaScript and CSS combination can be configured to be
> turned
> > > off.
> > > >> Regarding minimization, as long as the minimized version works in
> > > exactly
> > > >> the same way as the non-minimized version, and current minimizers do
> > > that,
> > > >> I can see no downside.
> > > >>
> > > >> --
> > > >> Thiago H. de Paula Figueiredo
> > > >> Tapestry, Java and Hibernate consultant and developer
> > > >> http://machina.com.br
> > > >>
> > > >>
> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > >> For additional commands, e-mail: users-help@tapestry.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > Howard M. Lewis Ship
> > > >
> > > > Creator of Apache Tapestry
> > > >
> > > > The source for Tapestry training, mentoring and support. Contact me
> to
> > > > learn how I can get you up and productive in Tapestry fast!
> > > >
> > > > (971) 678-5210
> > > > http://howardlewisship.com
> > > >
> > >
> > >
> > >
> > > --
> > > Howard M. Lewis Ship
> > >
> > > Creator of Apache Tapestry
> > >
> > > The source for Tapestry training, mentoring and support. Contact me to
> > > learn how I can get you up and productive in Tapestry fast!
> > >
> > > (971) 678-5210
> > > http://howardlewisship.com
> > >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>

Re: Tapestry 5.4-beta-2 GoogleClosureCompiler

Posted by Howard Lewis Ship <hl...@gmail.com>.
That's an interesting trade-off: bandwidth (gzip better) vs. cost of
unzipping (gzip worse). Good thing Tapestry does a good job of letting the
client cache the assets!


On Sun, Jan 19, 2014 at 1:04 AM, Kristian Marinkovic <
kristian.marinkovic@gmail.com> wrote:

> Thank you for all your responses and references.
>
> What i want to activate is the SIMPLE_OPTIMIZATIONS level that activates
> whitespace removal and renaming (shortening) of variables and functions. my
> webapp is getting used more by mobile clients (tablets, phonse) than
> desktop clients. during testing and optimization i realized that the form
> of the js -  eg. whitespaces - has an impact on the execution performance.
> gzip does a great job in shrinking the file sizes but unzipping on a mobile
> client has a performance toll which is noticeable on app startup leaving
> the user with the perception the app were slow.
>
> cheers,
> Kris
>
>
> On Fri, Jan 17, 2014 at 8:46 PM, Howard Lewis Ship <hl...@gmail.com>
> wrote:
>
> > That said, in a HTTP 2.0 world, there isn't such an advantage to
> > aggregation, especially with Tapestry's asset URLs (e.g., the encoding of
> > the content hash into the URL).
> >
> >
> > On Fri, Jan 17, 2014 at 11:45 AM, Howard Lewis Ship <hlship@gmail.com
> > >wrote:
> >
> > > Google Closure is best in a situation where *all* the JavaScript that
> > will
> > > be part of the page is known statically; it goes beyond other
> minimizers
> > in
> > > that, if you follow certain rules, it can perform real optimizations,
> > such
> > > as dead-code analysis and function inlining.  It can work with a couple
> > of
> > > stable libraries outside its domain, as long as you tell it about them,
> > but
> > > doesn't fit well with non-aggregated modules loading dynamically ...
> that
> > > defeats dead-code analysis, etc.
> > >
> > >
> > > On Fri, Jan 17, 2014 at 3:06 AM, Thiago H de Paula Figueiredo <
> > > thiagohp@gmail.com> wrote:
> > >
> > >> On Fri, 17 Jan 2014 07:12:14 -0200, Massimo Lusetti <
> mlusetti@gmail.com
> > >
> > >> wrote:
> > >>
> > >>  BTW as a side note I'm not completely sure all these minimization and
> > >>> concatenation are a good thing. Let's think about this a little bit
> > more.
> > >>>
> > >>> Some resources may help:
> > >>>
> > >>> http://rubyrogues.com/135-rr-http-2-0-with-ilya-grigorik/
> > >>>
> > >>
> > >> From Wikipedia: "HTTP 2.0 is the next planned version of the HTTP
> > network
> > >> protocol used by the World Wide Web.". That'll take some time until we
> > can
> > >> really assume most users are using it, maybe years. Regarding large
> > files,
> > >> I think that if you manage to make the browser cache the files and you
> > >> don't change them much, that won't be a problem. Tapestry, with
> stacks,
> > >> let's you choose what JS and CSS files will be bundled together. And,
> of
> > >> course, JavaScript and CSS combination can be configured to be turned
> > off.
> > >> Regarding minimization, as long as the minimized version works in
> > exactly
> > >> the same way as the non-minimized version, and current minimizers do
> > that,
> > >> I can see no downside.
> > >>
> > >> --
> > >> Thiago H. de Paula Figueiredo
> > >> Tapestry, Java and Hibernate consultant and developer
> > >> http://machina.com.br
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > >> For additional commands, e-mail: users-help@tapestry.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > Howard M. Lewis Ship
> > >
> > > Creator of Apache Tapestry
> > >
> > > The source for Tapestry training, mentoring and support. Contact me to
> > > learn how I can get you up and productive in Tapestry fast!
> > >
> > > (971) 678-5210
> > > http://howardlewisship.com
> > >
> >
> >
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator of Apache Tapestry
> >
> > The source for Tapestry training, mentoring and support. Contact me to
> > learn how I can get you up and productive in Tapestry fast!
> >
> > (971) 678-5210
> > http://howardlewisship.com
> >
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: Tapestry 5.4-beta-2 GoogleClosureCompiler

Posted by Kristian Marinkovic <kr...@gmail.com>.
Thank you for all your responses and references.

What i want to activate is the SIMPLE_OPTIMIZATIONS level that activates
whitespace removal and renaming (shortening) of variables and functions. my
webapp is getting used more by mobile clients (tablets, phonse) than
desktop clients. during testing and optimization i realized that the form
of the js -  eg. whitespaces - has an impact on the execution performance.
gzip does a great job in shrinking the file sizes but unzipping on a mobile
client has a performance toll which is noticeable on app startup leaving
the user with the perception the app were slow.

cheers,
Kris


On Fri, Jan 17, 2014 at 8:46 PM, Howard Lewis Ship <hl...@gmail.com> wrote:

> That said, in a HTTP 2.0 world, there isn't such an advantage to
> aggregation, especially with Tapestry's asset URLs (e.g., the encoding of
> the content hash into the URL).
>
>
> On Fri, Jan 17, 2014 at 11:45 AM, Howard Lewis Ship <hlship@gmail.com
> >wrote:
>
> > Google Closure is best in a situation where *all* the JavaScript that
> will
> > be part of the page is known statically; it goes beyond other minimizers
> in
> > that, if you follow certain rules, it can perform real optimizations,
> such
> > as dead-code analysis and function inlining.  It can work with a couple
> of
> > stable libraries outside its domain, as long as you tell it about them,
> but
> > doesn't fit well with non-aggregated modules loading dynamically ... that
> > defeats dead-code analysis, etc.
> >
> >
> > On Fri, Jan 17, 2014 at 3:06 AM, Thiago H de Paula Figueiredo <
> > thiagohp@gmail.com> wrote:
> >
> >> On Fri, 17 Jan 2014 07:12:14 -0200, Massimo Lusetti <mlusetti@gmail.com
> >
> >> wrote:
> >>
> >>  BTW as a side note I'm not completely sure all these minimization and
> >>> concatenation are a good thing. Let's think about this a little bit
> more.
> >>>
> >>> Some resources may help:
> >>>
> >>> http://rubyrogues.com/135-rr-http-2-0-with-ilya-grigorik/
> >>>
> >>
> >> From Wikipedia: "HTTP 2.0 is the next planned version of the HTTP
> network
> >> protocol used by the World Wide Web.". That'll take some time until we
> can
> >> really assume most users are using it, maybe years. Regarding large
> files,
> >> I think that if you manage to make the browser cache the files and you
> >> don't change them much, that won't be a problem. Tapestry, with stacks,
> >> let's you choose what JS and CSS files will be bundled together. And, of
> >> course, JavaScript and CSS combination can be configured to be turned
> off.
> >> Regarding minimization, as long as the minimized version works in
> exactly
> >> the same way as the non-minimized version, and current minimizers do
> that,
> >> I can see no downside.
> >>
> >> --
> >> Thiago H. de Paula Figueiredo
> >> Tapestry, Java and Hibernate consultant and developer
> >> http://machina.com.br
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator of Apache Tapestry
> >
> > The source for Tapestry training, mentoring and support. Contact me to
> > learn how I can get you up and productive in Tapestry fast!
> >
> > (971) 678-5210
> > http://howardlewisship.com
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>

Re: Tapestry 5.4-beta-2 GoogleClosureCompiler

Posted by Howard Lewis Ship <hl...@gmail.com>.
That said, in a HTTP 2.0 world, there isn't such an advantage to
aggregation, especially with Tapestry's asset URLs (e.g., the encoding of
the content hash into the URL).


On Fri, Jan 17, 2014 at 11:45 AM, Howard Lewis Ship <hl...@gmail.com>wrote:

> Google Closure is best in a situation where *all* the JavaScript that will
> be part of the page is known statically; it goes beyond other minimizers in
> that, if you follow certain rules, it can perform real optimizations, such
> as dead-code analysis and function inlining.  It can work with a couple of
> stable libraries outside its domain, as long as you tell it about them, but
> doesn't fit well with non-aggregated modules loading dynamically ... that
> defeats dead-code analysis, etc.
>
>
> On Fri, Jan 17, 2014 at 3:06 AM, Thiago H de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
>
>> On Fri, 17 Jan 2014 07:12:14 -0200, Massimo Lusetti <ml...@gmail.com>
>> wrote:
>>
>>  BTW as a side note I'm not completely sure all these minimization and
>>> concatenation are a good thing. Let's think about this a little bit more.
>>>
>>> Some resources may help:
>>>
>>> http://rubyrogues.com/135-rr-http-2-0-with-ilya-grigorik/
>>>
>>
>> From Wikipedia: "HTTP 2.0 is the next planned version of the HTTP network
>> protocol used by the World Wide Web.". That'll take some time until we can
>> really assume most users are using it, maybe years. Regarding large files,
>> I think that if you manage to make the browser cache the files and you
>> don't change them much, that won't be a problem. Tapestry, with stacks,
>> let's you choose what JS and CSS files will be bundled together. And, of
>> course, JavaScript and CSS combination can be configured to be turned off.
>> Regarding minimization, as long as the minimized version works in exactly
>> the same way as the non-minimized version, and current minimizers do that,
>> I can see no downside.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: Tapestry 5.4-beta-2 GoogleClosureCompiler

Posted by Howard Lewis Ship <hl...@gmail.com>.
Google Closure is best in a situation where *all* the JavaScript that will
be part of the page is known statically; it goes beyond other minimizers in
that, if you follow certain rules, it can perform real optimizations, such
as dead-code analysis and function inlining.  It can work with a couple of
stable libraries outside its domain, as long as you tell it about them, but
doesn't fit well with non-aggregated modules loading dynamically ... that
defeats dead-code analysis, etc.


On Fri, Jan 17, 2014 at 3:06 AM, Thiago H de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Fri, 17 Jan 2014 07:12:14 -0200, Massimo Lusetti <ml...@gmail.com>
> wrote:
>
>  BTW as a side note I'm not completely sure all these minimization and
>> concatenation are a good thing. Let's think about this a little bit more.
>>
>> Some resources may help:
>>
>> http://rubyrogues.com/135-rr-http-2-0-with-ilya-grigorik/
>>
>
> From Wikipedia: "HTTP 2.0 is the next planned version of the HTTP network
> protocol used by the World Wide Web.". That'll take some time until we can
> really assume most users are using it, maybe years. Regarding large files,
> I think that if you manage to make the browser cache the files and you
> don't change them much, that won't be a problem. Tapestry, with stacks,
> let's you choose what JS and CSS files will be bundled together. And, of
> course, JavaScript and CSS combination can be configured to be turned off.
> Regarding minimization, as long as the minimized version works in exactly
> the same way as the non-minimized version, and current minimizers do that,
> I can see no downside.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: Tapestry 5.4-beta-2 GoogleClosureCompiler

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 17 Jan 2014 07:12:14 -0200, Massimo Lusetti <ml...@gmail.com>  
wrote:

> BTW as a side note I'm not completely sure all these minimization and
> concatenation are a good thing. Let's think about this a little bit more.
>
> Some resources may help:
>
> http://rubyrogues.com/135-rr-http-2-0-with-ilya-grigorik/

 From Wikipedia: "HTTP 2.0 is the next planned version of the HTTP network  
protocol used by the World Wide Web.". That'll take some time until we can  
really assume most users are using it, maybe years. Regarding large files,  
I think that if you manage to make the browser cache the files and you  
don't change them much, that won't be a problem. Tapestry, with stacks,  
let's you choose what JS and CSS files will be bundled together. And, of  
course, JavaScript and CSS combination can be configured to be turned off.  
Regarding minimization, as long as the minimized version works in exactly  
the same way as the non-minimized version, and current minimizers do that,  
I can see no downside.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.4-beta-2 GoogleClosureCompiler

Posted by Massimo Lusetti <ml...@gmail.com>.
On Fri, Jan 17, 2014 at 2:31 AM, Howard Lewis Ship <hl...@gmail.com> wrote:

What are you looking for?  Advanced minimization, unfortunately, doesn't
> make sense when you are minimizing multiple files (there can always be a
> mix of stacks, libraries, and modules).
>
>
BTW as a side note I'm not completely sure all these minimization and
concatenation are a good thing. Let's think about this a little bit more.

Some resources may help:

http://rubyrogues.com/135-rr-http-2-0-with-ilya-grigorik/

https://docs.google.com/presentation/d/1f2J_HrzMNvVHhsB3f7DKJFPl2N0Q_QR2ZEECWQu6oV8/present#slide=id.p19

Please take time to read it then we can discuss it.

-- 
Massimo Lusetti

Re: Tapestry 5.4-beta-2 GoogleClosureCompiler

Posted by Howard Lewis Ship <hl...@gmail.com>.
What are you looking for?  Advanced minimization, unfortunately, doesn't
make sense when you are minimizing multiple files (there can always be a
mix of stacks, libraries, and modules).


On Mon, Jan 13, 2014 at 12:29 PM, Kristian Marinkovic <
kristian.marinkovic@gmail.com> wrote:

> Hi all,
>
> how do i set additional GoogleClosureMinimizer options? The current
> implementation in tapestry-webresources doesn't seem to offer any
> configuration possibilities besides replacing the whole service.
>
> cheers,
> Kris
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com