Re: Using GZip compression for js files in Ecommerce module

2012-04-08 Thread Pierre Smits
Hi all,

I don't know having this in OFBiz affects performance when OFBiz is behind
a webserver (like Apache HTTP) via normal proxy processes or via ajp, which
are standard scenarios in in a multi-tier, high availability/failover setup.

Regards,

Op 8 april 2012 11:13 schreef Jacques Le Roux
jacques.le.r...@les7arts.comhet volgende:

 You are missing a point Mandeep.

 OFBiz is already compressing text files. This is done through the embedded
 Tomcat. See in ofbiz-containers.xml
 {code}
 property name=compressableMimeType value=text/html,text/xml,**
 text/plain/
 property name=compression value=on/
 {code}

 Reference: 
 http://tomcat.apache.org/**tomcat-7.0-doc/config/http.**htmlhttp://tomcat.apache.org/tomcat-7.0-doc/config/http.html

 So my proposition was only to add an yui-compressor-ant-task to compress
 js/css files as described here
 http://developer.yahoo.com/**yui/compressor/http://developer.yahoo.com/yui/compressor/

 Note that for bigest files we already use compressed versions (ending by
 min.js, see framework/common/widget/**CommonScreens.xml and
 specialpurpose/ecommerce/**widget/CommonScreens.xml)


 Jacques

 From: Mandeep Sidhu mandeep1985s...@gmail.com

 created Jira 4792
 https://issues.apache.org/**jira/browse/OFBIZ-4792https://issues.apache.org/jira/browse/OFBIZ-4792
 but still this will only compress the files Jacques, what if the
 application is consuming external jss/css files, if the remote server has
 the capability to server GZip encoded content to the requesting client,
 we'd need to send the GZip encoding option in the http header for which I
 believe Ofbiz needs to be touched.

 Correct me if I am wrong.

 Regards,
 Mandeep Sidhu

 On Sun, Apr 8, 2012 at 11:21 AM, Jacques Le Roux 
 jacques.le.r...@les7arts.com wrote:

  I'd suggest to do it also for css 
 http://code.google.com/p/yui-http://code.google.com/p/yui-**
 compressor-ant-task/ http://code.google.com/p/yui-**
 compressor-ant-task/ http://code.google.com/p/yui-compressor-ant-task/
 
 You could create a Jira and contribute https://cwiki.apache.org/**
 confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
 https://cwiki.**apache.org/confluence/display/**
 OFBADMIN/OFBiz+Contributors+**Best+Practiceshttps://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
 ,
 this
 would be appreciated of course, not only for eCommerce BTW...

 Jacques

 From: Mandeep Sidhu mandeep1985s...@gmail.com

  Hi,


 I was wondering if it is possible to reduce the size of external
 javascript's being fetched by making use of GZip encoding.

 The feeding server does understand and responds to GZip encoding,
 however
 Ofbiz is not requesting the content in GZip format.

 Can anybody please guide me as to what all modifications I need to make
 so
 that Ofbiz will include the GZip encoding option in the http header
 while
 requesting the external javascript file ?

 Regards,
 Mandeeep Sidhu




 --
 Mandeep Singh Sidhu




Re: Using GZip compression for js files in Ecommerce module

2012-04-08 Thread Jacques Le Roux

You can also use mod_proxy + mod_deflate to do that but why do it since it's 
already included in OFBiz (same with nginx, etc.)?
So no, I don't think it adds any performance impact  if you don't use 
mod_deflate and I believe it should be very minor if ever you
do it twice (but again don't do it ;o)

Jacques

From: Pierre Smits pierre.sm...@gmail.com

Hi all,

I don't know having this in OFBiz affects performance when OFBiz is behind
a webserver (like Apache HTTP) via normal proxy processes or via ajp, which
are standard scenarios in in a multi-tier, high availability/failover setup.

Regards,

Op 8 april 2012 11:13 schreef Jacques Le Roux
jacques.le.r...@les7arts.comhet volgende:


You are missing a point Mandeep.

OFBiz is already compressing text files. This is done through the embedded
Tomcat. See in ofbiz-containers.xml
{code}
property name=compressableMimeType value=text/html,text/xml,**
text/plain/
property name=compression value=on/
{code}

Reference: 
http://tomcat.apache.org/**tomcat-7.0-doc/config/http.**htmlhttp://tomcat.apache.org/tomcat-7.0-doc/config/http.html

So my proposition was only to add an yui-compressor-ant-task to compress
js/css files as described here
http://developer.yahoo.com/**yui/compressor/http://developer.yahoo.com/yui/compressor/

Note that for bigest files we already use compressed versions (ending by
min.js, see framework/common/widget/**CommonScreens.xml and
specialpurpose/ecommerce/**widget/CommonScreens.xml)


Jacques

From: Mandeep Sidhu mandeep1985s...@gmail.com


created Jira 4792
https://issues.apache.org/**jira/browse/OFBIZ-4792https://issues.apache.org/jira/browse/OFBIZ-4792
but still this will only compress the files Jacques, what if the
application is consuming external jss/css files, if the remote server has
the capability to server GZip encoded content to the requesting client,
we'd need to send the GZip encoding option in the http header for which I
believe Ofbiz needs to be touched.

Correct me if I am wrong.

Regards,
Mandeep Sidhu

On Sun, Apr 8, 2012 at 11:21 AM, Jacques Le Roux 
jacques.le.r...@les7arts.com wrote:

 I'd suggest to do it also for css 
http://code.google.com/p/yui-http://code.google.com/p/yui-**

compressor-ant-task/ http://code.google.com/p/yui-**
compressor-ant-task/ http://code.google.com/p/yui-compressor-ant-task/

You could create a Jira and contribute https://cwiki.apache.org/**
confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
https://cwiki.**apache.org/confluence/display/**
OFBADMIN/OFBiz+Contributors+**Best+Practiceshttps://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
,
this
would be appreciated of course, not only for eCommerce BTW...

Jacques

From: Mandeep Sidhu mandeep1985s...@gmail.com

 Hi,



I was wondering if it is possible to reduce the size of external
javascript's being fetched by making use of GZip encoding.

The feeding server does understand and responds to GZip encoding,
however
Ofbiz is not requesting the content in GZip format.

Can anybody please guide me as to what all modifications I need to make
so
that Ofbiz will include the GZip encoding option in the http header
while
requesting the external javascript file ?

Regards,
Mandeeep Sidhu





--
Mandeep Singh Sidhu






Re: Using GZip compression for js files in Ecommerce module

2012-04-08 Thread Jacques Le Roux

Mmm.. finally this is wrong. Because if you use ajp then you bypass http/s 
connectors and you should handle compression using
mod_proxy + mod_deflate in HTTPD

Sorry for the confusion

Note: this is out of OFBiz scope

Jacques

From: Jacques Le Roux jacques.le.r...@les7arts.com

You can also use mod_proxy + mod_deflate to do that but why do it since it's 
already included in OFBiz (same with nginx, etc.)?
So no, I don't think it adds any performance impact  if you don't use mod_deflate and I believe it should be very minor if ever 
you

do it twice (but again don't do it ;o)

Jacques

From: Pierre Smits pierre.sm...@gmail.com

Hi all,

I don't know having this in OFBiz affects performance when OFBiz is behind
a webserver (like Apache HTTP) via normal proxy processes or via ajp, which
are standard scenarios in in a multi-tier, high availability/failover setup.

Regards,

Op 8 april 2012 11:13 schreef Jacques Le Roux
jacques.le.r...@les7arts.comhet volgende:


You are missing a point Mandeep.

OFBiz is already compressing text files. This is done through the embedded
Tomcat. See in ofbiz-containers.xml
{code}
property name=compressableMimeType value=text/html,text/xml,**
text/plain/
property name=compression value=on/
{code}

Reference: 
http://tomcat.apache.org/**tomcat-7.0-doc/config/http.**htmlhttp://tomcat.apache.org/tomcat-7.0-doc/config/http.html


So my proposition was only to add an yui-compressor-ant-task to compress
js/css files as described here
http://developer.yahoo.com/**yui/compressor/http://developer.yahoo.com/yui/compressor/

Note that for bigest files we already use compressed versions (ending by
min.js, see framework/common/widget/**CommonScreens.xml and
specialpurpose/ecommerce/**widget/CommonScreens.xml)


Jacques

From: Mandeep Sidhu mandeep1985s...@gmail.com


created Jira 4792
https://issues.apache.org/**jira/browse/OFBIZ-4792https://issues.apache.org/jira/browse/OFBIZ-4792
but still this will only compress the files Jacques, what if the
application is consuming external jss/css files, if the remote server has
the capability to server GZip encoded content to the requesting client,
we'd need to send the GZip encoding option in the http header for which I
believe Ofbiz needs to be touched.

Correct me if I am wrong.

Regards,
Mandeep Sidhu

On Sun, Apr 8, 2012 at 11:21 AM, Jacques Le Roux 
jacques.le.r...@les7arts.com wrote:

 I'd suggest to do it also for css 
http://code.google.com/p/yui-http://code.google.com/p/yui-**

compressor-ant-task/ http://code.google.com/p/yui-**
compressor-ant-task/ http://code.google.com/p/yui-compressor-ant-task/

You could create a Jira and contribute https://cwiki.apache.org/**
confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
https://cwiki.**apache.org/confluence/display/**
OFBADMIN/OFBiz+Contributors+**Best+Practiceshttps://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
,
this
would be appreciated of course, not only for eCommerce BTW...

Jacques

From: Mandeep Sidhu mandeep1985s...@gmail.com

 Hi,



I was wondering if it is possible to reduce the size of external
javascript's being fetched by making use of GZip encoding.

The feeding server does understand and responds to GZip encoding,
however
Ofbiz is not requesting the content in GZip format.

Can anybody please guide me as to what all modifications I need to make
so
that Ofbiz will include the GZip encoding option in the http header
while
requesting the external javascript file ?

Regards,
Mandeeep Sidhu





--
Mandeep Singh Sidhu








Re: Using GZip compression for js files in Ecommerce module

2012-04-08 Thread Jacques Le Roux

Note that, if you use something else than AJP (nginx with haproxy for instance) 
you will still use Tomcat HTTP connectors hence
internal OFBiz compression...

I have added text/javascript,text/css as new compressableMimeTypes at r1310975

What about adding property compressionMinSize=2048/?
It needs only to change XSD it seems, but what about the size?

Jacques

From: Jacques Le Roux jacques.le.r...@les7arts.com

Mmm.. finally this is wrong. Because if you use ajp then you bypass http/s 
connectors and you should handle compression using
mod_proxy + mod_deflate in HTTPD

Sorry for the confusion

Note: this is out of OFBiz scope

Jacques

From: Jacques Le Roux jacques.le.r...@les7arts.com

You can also use mod_proxy + mod_deflate to do that but why do it since it's 
already included in OFBiz (same with nginx, etc.)?
So no, I don't think it adds any performance impact  if you don't use 
mod_deflate and I believe it should be very minor if ever
you
do it twice (but again don't do it ;o)

Jacques

From: Pierre Smits pierre.sm...@gmail.com

Hi all,

I don't know having this in OFBiz affects performance when OFBiz is behind
a webserver (like Apache HTTP) via normal proxy processes or via ajp, which
are standard scenarios in in a multi-tier, high availability/failover setup.

Regards,

Op 8 april 2012 11:13 schreef Jacques Le Roux
jacques.le.r...@les7arts.comhet volgende:


You are missing a point Mandeep.

OFBiz is already compressing text files. This is done through the embedded
Tomcat. See in ofbiz-containers.xml
{code}
property name=compressableMimeType value=text/html,text/xml,**
text/plain/
property name=compression value=on/
{code}

Reference:
http://tomcat.apache.org/**tomcat-7.0-doc/config/http.**htmlhttp://tomcat.apache.org/tomcat-7.0-doc/config/http.html

So my proposition was only to add an yui-compressor-ant-task to compress
js/css files as described here
http://developer.yahoo.com/**yui/compressor/http://developer.yahoo.com/yui/compressor/

Note that for bigest files we already use compressed versions (ending by
min.js, see framework/common/widget/**CommonScreens.xml and
specialpurpose/ecommerce/**widget/CommonScreens.xml)


Jacques

From: Mandeep Sidhu mandeep1985s...@gmail.com


created Jira 4792
https://issues.apache.org/**jira/browse/OFBIZ-4792https://issues.apache.org/jira/browse/OFBIZ-4792
but still this will only compress the files Jacques, what if the
application is consuming external jss/css files, if the remote server has
the capability to server GZip encoded content to the requesting client,
we'd need to send the GZip encoding option in the http header for which I
believe Ofbiz needs to be touched.

Correct me if I am wrong.

Regards,
Mandeep Sidhu

On Sun, Apr 8, 2012 at 11:21 AM, Jacques Le Roux 
jacques.le.r...@les7arts.com wrote:

 I'd suggest to do it also for css 
http://code.google.com/p/yui-http://code.google.com/p/yui-**

compressor-ant-task/ http://code.google.com/p/yui-**
compressor-ant-task/ http://code.google.com/p/yui-compressor-ant-task/

You could create a Jira and contribute https://cwiki.apache.org/**
confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
https://cwiki.**apache.org/confluence/display/**
OFBADMIN/OFBiz+Contributors+**Best+Practiceshttps://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
,
this
would be appreciated of course, not only for eCommerce BTW...

Jacques

From: Mandeep Sidhu mandeep1985s...@gmail.com

 Hi,



I was wondering if it is possible to reduce the size of external
javascript's being fetched by making use of GZip encoding.

The feeding server does understand and responds to GZip encoding,
however
Ofbiz is not requesting the content in GZip format.

Can anybody please guide me as to what all modifications I need to make
so
that Ofbiz will include the GZip encoding option in the http header
while
requesting the external javascript file ?

Regards,
Mandeeep Sidhu





--
Mandeep Singh Sidhu