You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Laszlo Hornyak <la...@gmail.com> on 2013/07/02 10:50:25 UTC
Review Request 12228: static resource compression
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
Review request for cloudstack.
Repository: cloudstack-git
Description
-------
Just to share the idea.
Jetty can use the gzipped version of static resource files (html, js, css) to serve requests of browsers that accept gzip compression. This allows faster page loads and/or save bandwidth. CloudStack at this point has 2.4 MB of javascript files and a few hundred KB css files, which adds up to roughly 3 MB, with gzip compression it is just a few hundred KB.
This solution uses my custom maven plugin written for the purpose, other aporach may work as well.
Diffs
-----
client/pom.xml 222c520
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
Thanks,
Laszlo Hornyak
Re: Review Request 12228: static resource compression
Posted by Prasanna Santhanam <ts...@apache.org>.
> On July 2, 2013, 10:15 a.m., Prasanna Santhanam wrote:
> > Over VNC/RDP I've seen the login page take somewhere around 2minutes to load. This would definitely be useful.
>
> Prasanna Santhanam wrote:
> Here's the screen grab over RDP demonstrating the issue
> http://www.youtube.com/watch?v=lVCMSlBPX0E
>
> Because we use tomcat as the container in an actual production environment. How can we use this change?
>
> Laszlo Hornyak wrote:
> Hi,
>
> I will check what configuration is needed for tomcat, I am afraid I'd need either a valve or a filter implemented there. But it could be reused anywhere, so probably it makes sense to write that valve even then.
Thanks Laszlo, all the tomcat configuration goes into client/tomcatconf in the codebase.
- Prasanna
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review22657
-----------------------------------------------------------
On July 2, 2013, 8:50 a.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated July 2, 2013, 8:50 a.m.)
>
>
> Review request for cloudstack.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> Just to share the idea.
>
> Jetty can use the gzipped version of static resource files (html, js, css) to serve requests of browsers that accept gzip compression. This allows faster page loads and/or save bandwidth. CloudStack at this point has 2.4 MB of javascript files and a few hundred KB css files, which adds up to roughly 3 MB, with gzip compression it is just a few hundred KB.
>
> This solution uses my custom maven plugin written for the purpose, other aporach may work as well.
>
>
> Diffs
> -----
>
> client/pom.xml 222c520
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
> On July 2, 2013, 10:15 a.m., Prasanna Santhanam wrote:
> > Over VNC/RDP I've seen the login page take somewhere around 2minutes to load. This would definitely be useful.
>
> Prasanna Santhanam wrote:
> Here's the screen grab over RDP demonstrating the issue
> http://www.youtube.com/watch?v=lVCMSlBPX0E
>
> Because we use tomcat as the container in an actual production environment. How can we use this change?
Hi,
I will check what configuration is needed for tomcat, I am afraid I'd need either a valve or a filter implemented there. But it could be reused anywhere, so probably it makes sense to write that valve even then.
- Laszlo
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review22657
-----------------------------------------------------------
On July 2, 2013, 8:50 a.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated July 2, 2013, 8:50 a.m.)
>
>
> Review request for cloudstack.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> Just to share the idea.
>
> Jetty can use the gzipped version of static resource files (html, js, css) to serve requests of browsers that accept gzip compression. This allows faster page loads and/or save bandwidth. CloudStack at this point has 2.4 MB of javascript files and a few hundred KB css files, which adds up to roughly 3 MB, with gzip compression it is just a few hundred KB.
>
> This solution uses my custom maven plugin written for the purpose, other aporach may work as well.
>
>
> Diffs
> -----
>
> client/pom.xml 222c520
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Prasanna Santhanam <ts...@apache.org>.
> On July 2, 2013, 10:15 a.m., Prasanna Santhanam wrote:
> > Over VNC/RDP I've seen the login page take somewhere around 2minutes to load. This would definitely be useful.
Here's the screen grab over RDP demonstrating the issue
http://www.youtube.com/watch?v=lVCMSlBPX0E
Because we use tomcat as the container in an actual production environment. How can we use this change?
- Prasanna
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review22657
-----------------------------------------------------------
On July 2, 2013, 8:50 a.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated July 2, 2013, 8:50 a.m.)
>
>
> Review request for cloudstack.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> Just to share the idea.
>
> Jetty can use the gzipped version of static resource files (html, js, css) to serve requests of browsers that accept gzip compression. This allows faster page loads and/or save bandwidth. CloudStack at this point has 2.4 MB of javascript files and a few hundred KB css files, which adds up to roughly 3 MB, with gzip compression it is just a few hundred KB.
>
> This solution uses my custom maven plugin written for the purpose, other aporach may work as well.
>
>
> Diffs
> -----
>
> client/pom.xml 222c520
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Prasanna Santhanam <ts...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review22657
-----------------------------------------------------------
Over VNC/RDP I've seen the login page take somewhere around 2minutes to load. This would definitely be useful.
- Prasanna Santhanam
On July 2, 2013, 8:50 a.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated July 2, 2013, 8:50 a.m.)
>
>
> Review request for cloudstack.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> Just to share the idea.
>
> Jetty can use the gzipped version of static resource files (html, js, css) to serve requests of browsers that accept gzip compression. This allows faster page loads and/or save bandwidth. CloudStack at this point has 2.4 MB of javascript files and a few hundred KB css files, which adds up to roughly 3 MB, with gzip compression it is just a few hundred KB.
>
> This solution uses my custom maven plugin written for the purpose, other aporach may work as well.
>
>
> Diffs
> -----
>
> client/pom.xml 222c520
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: wip: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
> On Oct. 4, 2013, 6:52 p.m., Darren Shepherd wrote:
> > I would prefer not to do this. From a technical perspective the code uses getRealPath and Files which are not compatible across all serlvet containers and this implementation forces a lot of file system stat() calls, but that isn't my real complaint. This change adds yet another step to the already long ACS build and I don't think it address the root issue. The root issue, if one was to really care about performance is that the js is not cachable or consolidated. ts=$now is added to every js file, meaning it must be downloaded every time. Additionally to load the login screen there are 66 requests for JS files. Even if you compress 2mb to 800k, on a slow connection it won't matter that much because you are going to get killed regardless by the round trip latency of making 66 requests.
Hi Darren,
I share your concerns about the build process and I do not want to further increase that. What I had in my mind is an optional step (possibly in a profile) acivated only for making releases and by default not in a developement environment. Not that much to save 2 mb of bandwidth, but to save the time the user have to wait.
The difficulties with the non cacheable js files is indeed a problem, and I believe that should be addressed separately. (I do not quite understand yet what is that for)
Also, the dynamic informations can be compressed if it makes sense, e.g. over a given size.
I added the wip prefix to this to make it clear that this patch is "preview" version and more discussion is needed.
- Laszlo
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review26690
-----------------------------------------------------------
On Oct. 4, 2013, 8:19 p.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated Oct. 4, 2013, 8:19 p.m.)
>
>
> Review request for cloudstack, Brian Federle and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml e5c05d3
> client/pom.xml 119c96e
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: wip: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
> On Oct. 4, 2013, 6:52 p.m., Darren Shepherd wrote:
> > I would prefer not to do this. From a technical perspective the code uses getRealPath and Files which are not compatible across all serlvet containers and this implementation forces a lot of file system stat() calls, but that isn't my real complaint. This change adds yet another step to the already long ACS build and I don't think it address the root issue. The root issue, if one was to really care about performance is that the js is not cachable or consolidated. ts=$now is added to every js file, meaning it must be downloaded every time. Additionally to load the login screen there are 66 requests for JS files. Even if you compress 2mb to 800k, on a slow connection it won't matter that much because you are going to get killed regardless by the round trip latency of making 66 requests.
>
> Laszlo Hornyak wrote:
> Hi Darren,
>
> I share your concerns about the build process and I do not want to further increase that. What I had in my mind is an optional step (possibly in a profile) acivated only for making releases and by default not in a developement environment. Not that much to save 2 mb of bandwidth, but to save the time the user have to wait.
>
> The difficulties with the non cacheable js files is indeed a problem, and I believe that should be addressed separately. (I do not quite understand yet what is that for)
>
> Also, the dynamic informations can be compressed if it makes sense, e.g. over a given size.
>
> I added the wip prefix to this to make it clear that this patch is "preview" version and more discussion is needed.
>
> Brian Federle wrote:
> re: caching of JS files, I believe the reason ts=$now is appended to the JS files was because of issues during upgrade testing, where the old JS files would not be cleared from the browser cache. If we can consolidate into 1 JS file then we don't need that functionality anymore, as it was more a problem due to the large # of scripts being loaded at once.
what was wrong with the http cache control headers?
- Laszlo
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review26690
-----------------------------------------------------------
On Oct. 4, 2013, 8:19 p.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated Oct. 4, 2013, 8:19 p.m.)
>
>
> Review request for cloudstack, Brian Federle and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml e5c05d3
> client/pom.xml 119c96e
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: wip: static resource compression
Posted by Brian Federle <br...@citrix.com>.
> On Oct. 4, 2013, 6:52 p.m., Darren Shepherd wrote:
> > I would prefer not to do this. From a technical perspective the code uses getRealPath and Files which are not compatible across all serlvet containers and this implementation forces a lot of file system stat() calls, but that isn't my real complaint. This change adds yet another step to the already long ACS build and I don't think it address the root issue. The root issue, if one was to really care about performance is that the js is not cachable or consolidated. ts=$now is added to every js file, meaning it must be downloaded every time. Additionally to load the login screen there are 66 requests for JS files. Even if you compress 2mb to 800k, on a slow connection it won't matter that much because you are going to get killed regardless by the round trip latency of making 66 requests.
>
> Laszlo Hornyak wrote:
> Hi Darren,
>
> I share your concerns about the build process and I do not want to further increase that. What I had in my mind is an optional step (possibly in a profile) acivated only for making releases and by default not in a developement environment. Not that much to save 2 mb of bandwidth, but to save the time the user have to wait.
>
> The difficulties with the non cacheable js files is indeed a problem, and I believe that should be addressed separately. (I do not quite understand yet what is that for)
>
> Also, the dynamic informations can be compressed if it makes sense, e.g. over a given size.
>
> I added the wip prefix to this to make it clear that this patch is "preview" version and more discussion is needed.
re: caching of JS files, I believe the reason ts=$now is appended to the JS files was because of issues during upgrade testing, where the old JS files would not be cleared from the browser cache. If we can consolidate into 1 JS file then we don't need that functionality anymore, as it was more a problem due to the large # of scripts being loaded at once.
- Brian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review26690
-----------------------------------------------------------
On Oct. 4, 2013, 8:19 p.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated Oct. 4, 2013, 8:19 p.m.)
>
>
> Review request for cloudstack, Brian Federle and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml e5c05d3
> client/pom.xml 119c96e
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Darren Shepherd <da...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review26690
-----------------------------------------------------------
I would prefer not to do this. From a technical perspective the code uses getRealPath and Files which are not compatible across all serlvet containers and this implementation forces a lot of file system stat() calls, but that isn't my real complaint. This change adds yet another step to the already long ACS build and I don't think it address the root issue. The root issue, if one was to really care about performance is that the js is not cachable or consolidated. ts=$now is added to every js file, meaning it must be downloaded every time. Additionally to load the login screen there are 66 requests for JS files. Even if you compress 2mb to 800k, on a slow connection it won't matter that much because you are going to get killed regardless by the round trip latency of making 66 requests.
- Darren Shepherd
On Sept. 24, 2013, 6:57 a.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated Sept. 24, 2013, 6:57 a.m.)
>
>
> Review request for cloudstack, Brian Federle and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml e5c05d3
> client/pom.xml 119c96e
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review41058
-----------------------------------------------------------
ping?
- Laszlo Hornyak
On April 18, 2014, 11:08 p.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated April 18, 2014, 11:08 p.m.)
>
>
> Review request for cloudstack, Brian Federle, Darren Shepherd, Jessica Wang, and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml 1af38e1
> client/pom.xml aee2672
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
> yes, tested with firefox and chrome
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated April 18, 2014, 11:08 p.m.)
Review request for cloudstack, Brian Federle, Darren Shepherd, Jessica Wang, and Prasanna Santhanam.
Changes
-------
removed a pair of critical trailing white spaces
Repository: cloudstack-git
Description
-------
CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
Diffs (updated)
-----
client/WEB-INF/web.xml 1af38e1
client/pom.xml aee2672
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
yes, tested with firefox and chrome
Thanks,
Laszlo Hornyak
Re: Review Request 12228: static resource compression
Posted by Brian Federle <br...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review39322
-----------------------------------------------------------
Lazlo, I just tested your changes and everything looks good to me.
- Brian Federle
On March 30, 2014, 8:08 p.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated March 30, 2014, 8:08 p.m.)
>
>
> Review request for cloudstack, Brian Federle, Darren Shepherd, Jessica Wang, and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml 1af38e1
> client/pom.xml d8dbde7
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
> yes, tested with firefox and chrome
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated March 30, 2014, 8:08 p.m.)
Review request for cloudstack, Brian Federle, Darren Shepherd, Jessica Wang, and Prasanna Santhanam.
Repository: cloudstack-git
Description
-------
CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
Diffs
-----
client/WEB-INF/web.xml 1af38e1
client/pom.xml d8dbde7
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
yes, tested with firefox and chrome
Thanks,
Laszlo Hornyak
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
> On March 21, 2014, 8:07 p.m., Laszlo Hornyak wrote:
> > https://docs.google.com/spreadsheet/ccc?key=0ApMkIX1Ygx8zdHhqV2RETy05SDU1WER3Z2JEN3ktZHc&usp=sharing
> >
> > Comparison of 3 configurations, the dynamic compression solution is the last one. This test was conducted in a VM with 2 vCPU and 4 GB RAM on a
> > AMD E2-1800.
> >
Anyone managed to verify the results? Comments or thoughts?
- Laszlo
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review38181
-----------------------------------------------------------
On March 20, 2014, 7:53 p.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated March 20, 2014, 7:53 p.m.)
>
>
> Review request for cloudstack, Brian Federle, Darren Shepherd, and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml 1af38e1
> client/pom.xml d8dbde7
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
> yes, tested with firefox and chrome
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
Hi John,
I used simple apache benchmark with a random selected css.
ab -n 2000 -H "Accept-Encoding: gzip, deflate"
http://172.17.10.10/client/css/cloudstack3.css
This looks big enough, it is about 200 K uncompressed.
I used the configuration you published in your blog and I disabled the
static resource compression by commenting the servlet out from the web.xml,
I verified the configurations by examining the headers and message body.
Since the tested VM is a local VM, the network latency is really close to
zero.
Please share your results! I was surprised first about the low performance
of dynamic compression, I expected it to be somewhat slower and I believe
the resource size or maybe even the content itself can alter the results.
But theoretically it can never be as fast as static compression since that
is just plain IO.
Some other comparisons done by others
http://www.webperformance.com/library/reports/moddeflate/
http://www.webperformance.com/library/reports/iis7_compression/ - ISS too
As I wrote, I believe the best solution would be combining both static and
dynamic.
On Fri, Mar 21, 2014 at 10:03 PM, John Kinsella <jl...@stratosec.co> wrote:
> Canya tell us a little more about the test you're doing? What URL are you
> fetching, how many times etc. Just curious to tinker myself this weekend if
> I have some time. :)
>
> On Mar 21, 2014, at 1:07 PM, Laszlo Hornyak <la...@gmail.com>
> wrote:
>
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/#review38181
> -----------------------------------------------------------
>
>
>
> https://docs.google.com/spreadsheet/ccc?key=0ApMkIX1Ygx8zdHhqV2RETy05SDU1WER3Z2JEN3ktZHc&usp=sharing
>
> Comparison of 3 configurations, the dynamic compression solution is the
> last one. This test was conducted in a VM with 2 vCPU and 4 GB RAM on a
> AMD E2-1800.
>
>
> - Laszlo Hornyak
>
>
> On March 20, 2014, 7:53 p.m., Laszlo Hornyak wrote:
>
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated March 20, 2014, 7:53 p.m.)
>
>
> Review request for cloudstack, Brian Federle, Darren Shepherd, and
> Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the
> client. With a weak internet connection, this might take a long time. With
> gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static
> resources, so that no dynamic compression is needed at runtime. When the
> static resource servlet notices that there is gzipped version of the
> resource and the client accepts gzipped content, then it is going to send
> the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml 1af38e1
> client/pom.xml d8dbde7
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
> yes, tested with firefox and chrome
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
>
>
> Stratosec <http://stratosec.co/> - Compliance as a Service
> o: 415.315.9385
> @johnlkinsella <http://twitter.com/johnlkinsella>
>
>
--
EOF
Re: Review Request 12228: static resource compression
Posted by John Kinsella <jl...@stratosec.co>.
Canya tell us a little more about the test you’re doing? What URL are you fetching, how many times etc. Just curious to tinker myself this weekend if I have some time. :)
On Mar 21, 2014, at 1:07 PM, Laszlo Hornyak <la...@gmail.com>> wrote:
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review38181
-----------------------------------------------------------
https://docs.google.com/spreadsheet/ccc?key=0ApMkIX1Ygx8zdHhqV2RETy05SDU1WER3Z2JEN3ktZHc&usp=sharing
Comparison of 3 configurations, the dynamic compression solution is the last one. This test was conducted in a VM with 2 vCPU and 4 GB RAM on a
AMD E2-1800.
- Laszlo Hornyak
On March 20, 2014, 7:53 p.m., Laszlo Hornyak wrote:
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated March 20, 2014, 7:53 p.m.)
Review request for cloudstack, Brian Federle, Darren Shepherd, and Prasanna Santhanam.
Repository: cloudstack-git
Description
-------
CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
Diffs
-----
client/WEB-INF/web.xml 1af38e1
client/pom.xml d8dbde7
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
yes, tested with firefox and chrome
Thanks,
Laszlo Hornyak
Stratosec<http://stratosec.co/> - Compliance as a Service
o: 415.315.9385
@johnlkinsella<http://twitter.com/johnlkinsella>
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review38181
-----------------------------------------------------------
https://docs.google.com/spreadsheet/ccc?key=0ApMkIX1Ygx8zdHhqV2RETy05SDU1WER3Z2JEN3ktZHc&usp=sharing
Comparison of 3 configurations, the dynamic compression solution is the last one. This test was conducted in a VM with 2 vCPU and 4 GB RAM on a
AMD E2-1800.
- Laszlo Hornyak
On March 20, 2014, 7:53 p.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated March 20, 2014, 7:53 p.m.)
>
>
> Review request for cloudstack, Brian Federle, Darren Shepherd, and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml 1af38e1
> client/pom.xml d8dbde7
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
> yes, tested with firefox and chrome
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
url: https://wiki.eclipse.org/Jetty/Feature/GZIP_Compression#Static_Content
On Thu, Mar 20, 2014 at 11:19 PM, John Kinsella <jl...@stratosec.co> wrote:
> Laszlo, can you reference any other open source projects that have
> similar solutions to this issue? Anything I've read states dynamic
> compression in tomcat/httpd/nginx does not add significant CPU overhead.
>
> On Mar 20, 2014, at 12:53 PM, Laszlo Hornyak <la...@gmail.com>
> wrote:
>
>
> -----------------------------------------------------------
>
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated March 20, 2014, 7:53 p.m.)
>
>
>
> Review request for cloudstack, Brian Federle, Darren Shepherd, and
> Prasanna Santhanam.
>
>
> Changes
> -------
>
> spaces
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the
> client. With a weak internet connection, this might take a long time. With
> gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static
> resources, so that no dynamic compression is needed at runtime. When the
> static resource servlet notices that there is gzipped version of the
> resource and the client accepts gzipped content, then it is going to send
> the gziped version, while still respects http caching.
>
>
> Diffs (updated)
> -----
>
> client/WEB-INF/web.xml 1af38e1
> client/pom.xml d8dbde7
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> yes, tested with firefox and chrome
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
> Stratosec <http://stratosec.co/> - Compliance as a Service
> o: 415.315.9385
> @johnlkinsella <http://twitter.com/johnlkinsella>
>
>
--
EOF
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
Hi John,
Jetty gives this functionality by default without a filter/servlet, simply
it is not available in tomcat. I used this functionality a lot in jetty and
that plus the massive size of the UI gave me the idea.
My approach to the problem was motivated by that I don't like to see
anything wasted, but let's make a measurement and see what the impact is.
This is what could be interesting in comparison with dynamic compression:
- request/sec and average delay for static resoures in different sizes
- time taken by full page reload
On Thu, Mar 20, 2014 at 11:19 PM, John Kinsella <jl...@stratosec.co> wrote:
> Laszlo, can you reference any other open source projects that have
> similar solutions to this issue? Anything I've read states dynamic
> compression in tomcat/httpd/nginx does not add significant CPU overhead.
>
> On Mar 20, 2014, at 12:53 PM, Laszlo Hornyak <la...@gmail.com>
> wrote:
>
>
> -----------------------------------------------------------
>
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated March 20, 2014, 7:53 p.m.)
>
>
>
> Review request for cloudstack, Brian Federle, Darren Shepherd, and
> Prasanna Santhanam.
>
>
> Changes
> -------
>
> spaces
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the
> client. With a weak internet connection, this might take a long time. With
> gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static
> resources, so that no dynamic compression is needed at runtime. When the
> static resource servlet notices that there is gzipped version of the
> resource and the client accepts gzipped content, then it is going to send
> the gziped version, while still respects http caching.
>
>
> Diffs (updated)
> -----
>
> client/WEB-INF/web.xml 1af38e1
> client/pom.xml d8dbde7
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> yes, tested with firefox and chrome
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
> Stratosec <http://stratosec.co/> - Compliance as a Service
> o: 415.315.9385
> @johnlkinsella <http://twitter.com/johnlkinsella>
>
>
--
EOF
Re: Review Request 12228: static resource compression
Posted by John Kinsella <jl...@stratosec.co>.
Laszlo, can you reference any other open source projects that have similar solutions to this issue? Anything I’ve read states dynamic compression in tomcat/httpd/nginx does not add significant CPU overhead.
On Mar 20, 2014, at 12:53 PM, Laszlo Hornyak <la...@gmail.com>> wrote:
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated March 20, 2014, 7:53 p.m.)
Review request for cloudstack, Brian Federle, Darren Shepherd, and Prasanna Santhanam.
Changes
-------
spaces
Repository: cloudstack-git
Description
-------
CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
Diffs (updated)
-----
client/WEB-INF/web.xml 1af38e1
client/pom.xml d8dbde7
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
yes, tested with firefox and chrome
Thanks,
Laszlo Hornyak
Stratosec<http://stratosec.co/> - Compliance as a Service
o: 415.315.9385
@johnlkinsella<http://twitter.com/johnlkinsella>
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated March 20, 2014, 7:53 p.m.)
Review request for cloudstack, Brian Federle, Darren Shepherd, and Prasanna Santhanam.
Changes
-------
spaces
Repository: cloudstack-git
Description
-------
CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
Diffs (updated)
-----
client/WEB-INF/web.xml 1af38e1
client/pom.xml d8dbde7
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
yes, tested with firefox and chrome
Thanks,
Laszlo Hornyak
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated March 19, 2014, 8:13 p.m.)
Review request for cloudstack, Brian Federle, Darren Shepherd, and Prasanna Santhanam.
Changes
-------
-updated to use plugin from central repo
-fixed spaces/tabs
-license header added
Summary (updated)
-----------------
static resource compression
Repository: cloudstack-git
Description
-------
CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
Diffs (updated)
-----
client/WEB-INF/web.xml 1af38e1
client/pom.xml 615d244
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing (updated)
-------
yes, tested with firefox and chrome
Thanks,
Laszlo Hornyak
Re: Review Request 12228: static resource compression
Posted by daan Hoogland <da...@gmail.com>.
> On Feb. 2, 2014, 6:03 p.m., daan Hoogland wrote:
> > client/WEB-INF/web.xml, line 63
> > <https://reviews.apache.org/r/12228/diff/2/?file=354637#file354637line63>
> >
> > can you use tabs instead of spaces (and while you are at it remove trailing spaces from this file)?
>
> Laszlo Hornyak wrote:
> trailing white spaces: ok
> spaces to tabs: all this file is tabed with spaces, so this would be the first thing with tabs.
sorry i mean 'spaces instead of tabs'not vice versa.
- daan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review33400
-----------------------------------------------------------
On March 19, 2014, 8:13 p.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated March 19, 2014, 8:13 p.m.)
>
>
> Review request for cloudstack, Brian Federle, Darren Shepherd, and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml 1af38e1
> client/pom.xml 615d244
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
> yes, tested with firefox and chrome
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
> On Feb. 2, 2014, 6:03 p.m., daan Hoogland wrote:
> > client/WEB-INF/web.xml, line 63
> > <https://reviews.apache.org/r/12228/diff/2/?file=354637#file354637line63>
> >
> > can you use tabs instead of spaces (and while you are at it remove trailing spaces from this file)?
trailing white spaces: ok
spaces to tabs: all this file is tabed with spaces, so this would be the first thing with tabs.
- Laszlo
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review33400
-----------------------------------------------------------
On March 19, 2014, 8:13 p.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated March 19, 2014, 8:13 p.m.)
>
>
> Review request for cloudstack, Brian Federle, Darren Shepherd, and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml 1af38e1
> client/pom.xml 615d244
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
> yes, tested with firefox and chrome
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: wip: static resource compression
Posted by daan Hoogland <da...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review33400
-----------------------------------------------------------
client/WEB-INF/web.xml
<https://reviews.apache.org/r/12228/#comment62858>
can you use tabs instead of spaces (and while you are at it remove trailing spaces from this file)?
client/pom.xml
<https://reviews.apache.org/r/12228/#comment62859>
please remove tab
server/src/com/cloud/servlet/StaticResourceServlet.java
<https://reviews.apache.org/r/12228/#comment62857>
please add a license header
server/test/com/cloud/servlet/StaticResourceServletTest.java
<https://reviews.apache.org/r/12228/#comment62856>
please add a license header
- daan Hoogland
On Feb. 2, 2014, 5:04 p.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated Feb. 2, 2014, 5:04 p.m.)
>
>
> Review request for cloudstack, Brian Federle, Darren Shepherd, and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml e5c05d3
> client/pom.xml 119c96e
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: wip: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated Feb. 2, 2014, 5:04 p.m.)
Review request for cloudstack, Brian Federle, Darren Shepherd, and Prasanna Santhanam.
Repository: cloudstack-git
Description
-------
CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
Diffs
-----
client/WEB-INF/web.xml e5c05d3
client/pom.xml 119c96e
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
Thanks,
Laszlo Hornyak
Re: Review Request 12228: wip: static resource compression
Posted by Prasanna Santhanam <ts...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated Oct. 31, 2013, 1:36 a.m.)
Review request for cloudstack, Brian Federle, Darren Shepherd, and Prasanna Santhanam.
Repository: cloudstack-git
Description
-------
CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
Diffs
-----
client/WEB-INF/web.xml e5c05d3
client/pom.xml 119c96e
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
Thanks,
Laszlo Hornyak
Re: Review Request 12228: wip: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated Oct. 4, 2013, 8:19 p.m.)
Review request for cloudstack, Brian Federle and Prasanna Santhanam.
Summary (updated)
-----------------
wip: static resource compression
Repository: cloudstack-git
Description
-------
CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
Diffs
-----
client/WEB-INF/web.xml e5c05d3
client/pom.xml 119c96e
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
Thanks,
Laszlo Hornyak
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
> On Sept. 27, 2013, 6:40 p.m., Brian Federle wrote:
> > For the next release I'm planning to refactor the stylesheets to use the SASS compiler. Will this effect integration of a SASS compiler in any way?
> >
> > FYI The one I'm considering is https://github.com/Jasig/sass-maven-plugin. This hasn't been integrated yet and I am looking for someone with mvn build experience to work on it, though you are welcome to give this a try as well if you want :)
Hi Brian,
I think it can work together, I will give it a try and send you a prototype.
- Laszlo
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review26435
-----------------------------------------------------------
On Sept. 24, 2013, 6:57 a.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated Sept. 24, 2013, 6:57 a.m.)
>
>
> Review request for cloudstack, Brian Federle and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml e5c05d3
> client/pom.xml 119c96e
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Brian Federle <br...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/#review26435
-----------------------------------------------------------
For the next release I'm planning to refactor the stylesheets to use the SASS compiler. Will this effect integration of a SASS compiler in any way?
FYI The one I'm considering is https://github.com/Jasig/sass-maven-plugin. This hasn't been integrated yet and I am looking for someone with mvn build experience to work on it, though you are welcome to give this a try as well if you want :)
- Brian Federle
On Sept. 24, 2013, 6:57 a.m., Laszlo Hornyak wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12228/
> -----------------------------------------------------------
>
> (Updated Sept. 24, 2013, 6:57 a.m.)
>
>
> Review request for cloudstack, Brian Federle and Prasanna Santhanam.
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
>
> This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
>
>
> Diffs
> -----
>
> client/WEB-INF/web.xml e5c05d3
> client/pom.xml 119c96e
> server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
> server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/12228/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Laszlo Hornyak
>
>
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated Sept. 24, 2013, 6:57 a.m.)
Review request for cloudstack, Brian Federle and Prasanna Santhanam.
Repository: cloudstack-git
Description (updated)
-------
CloudStack at first use downloads some 3.5 MB of css and javascript to the client. With a weak internet connection, this might take a long time. With gzip compression content can be compressed to 850 KB.
This version of the patch uses a custom plugin to compress static resources, so that no dynamic compression is needed at runtime. When the static resource servlet notices that there is gzipped version of the resource and the client accepts gzipped content, then it is going to send the gziped version, while still respects http caching.
Diffs
-----
client/WEB-INF/web.xml e5c05d3
client/pom.xml 119c96e
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
Thanks,
Laszlo Hornyak
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated Sept. 24, 2013, 6:51 a.m.)
Review request for cloudstack, Brian Federle and Prasanna Santhanam.
Repository: cloudstack-git
Description
-------
Just to share the idea.
Jetty can use the gzipped version of static resource files (html, js, css) to serve requests of browsers that accept gzip compression. This allows faster page loads and/or save bandwidth. CloudStack at this point has 2.4 MB of javascript files and a few hundred KB css files, which adds up to roughly 3 MB, with gzip compression it is just a few hundred KB.
This solution uses my custom maven plugin written for the purpose, other aporach may work as well.
Diffs
-----
client/WEB-INF/web.xml e5c05d3
client/pom.xml 119c96e
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
Thanks,
Laszlo Hornyak
Re: Review Request 12228: static resource compression
Posted by Laszlo Hornyak <la...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12228/
-----------------------------------------------------------
(Updated Sept. 20, 2013, 10:01 a.m.)
Review request for cloudstack.
Changes
-------
Second version of the patch:
- does not build anything on jetty's behavior anymore adds a servlet to handle the static resources
- servlet mapped to css and js files
- unit test included for the servlet
Repository: cloudstack-git
Description
-------
Just to share the idea.
Jetty can use the gzipped version of static resource files (html, js, css) to serve requests of browsers that accept gzip compression. This allows faster page loads and/or save bandwidth. CloudStack at this point has 2.4 MB of javascript files and a few hundred KB css files, which adds up to roughly 3 MB, with gzip compression it is just a few hundred KB.
This solution uses my custom maven plugin written for the purpose, other aporach may work as well.
Diffs (updated)
-----
client/WEB-INF/web.xml e5c05d3
client/pom.xml 119c96e
server/src/com/cloud/servlet/StaticResourceServlet.java PRE-CREATION
server/test/com/cloud/servlet/StaticResourceServletTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/12228/diff/
Testing
-------
Thanks,
Laszlo Hornyak