Quantcast

RE: Compress Plugin v 0.2

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Compress Plugin v 0.2

Seymour Cakes
HI All,

A very big thanks to Kevin Burke for some major improvements to the Compress Plugin.

I have update the plugin with his patch, but the plugin page is not updated yet. So for now I attached along Kevin's instructions for the improvement details.

Cheers
Sey

----------------------------------------------------------------------------------
Kevin Burke wrote:

I've made a few modifications that allow it to be more configurable based on the api docs here: http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilter.html.

I also added a tag library that will output the various statistics that are provided by the package found here: http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilterStats.html.  Of course the statsEnabled configuration must be set to true.

Here is a sample of a configuration that can go into your Config.groovy:

compress {
    // just in case for some reason you want to disable the filter
    enabled = true

    debug = false
    statsEnabled = true
    compressionThreshold = 1024
    // filter's url-patterns
    urlPatterns = ["/*"]
    // include and exclude are mutually exclusive
    includePathPatterns = []
    excludePathPatterns = [".*\\.gif", ".*\\.ico", ".*\\.jpg"]
    // include and exclude are mutually exclusive
    includeContentTypes = []
    excludeContentTypes = ["image/png"]
    // include and exclude are mutually exclusive
    includeUserAgentPatterns = []
    excludeUserAgentPatterns = [".*MSIE 4.*"]
    // probably don't want these, but their available if needed
    javaUtilLogger = ""
    jakartaCommonsLogger = ""

    development {
        debug = true
        compressionThreshold = 2048
    }
    production {
        statsEnabled = false
    }
}

Any environment specific configurations will override the defaults.  The plugin also functions just as it had when you released the plugin if there isn't a "compress" directive in Config.groovy

Thanks again for this nice piece of work.  You may or may not see the modifications as an improvement, but I figured I'd give back.

Thanks,
Kevin Burke


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

compress.zip (64K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RE: Compress Plugin v 0.2

Peter Cold
What's the protocol for updating the plugin pages on the grails.org site?   The Compress page sure could benefit from the documentation below.  I know it's a wiki and I'd be happy to edit the page but don't want to step on any toes....



On Mon, Jun 9, 2008 at 1:26 AM, Seymour Cakes <[hidden email]> wrote:
HI All,

A very big thanks to Kevin Burke for some major improvements to the Compress Plugin.

I have update the plugin with his patch, but the plugin page is not updated yet. So for now I attached along Kevin's instructions for the improvement details.

Cheers
Sey

----------------------------------------------------------------------------------
Kevin Burke wrote:

I've made a few modifications that allow it to be more configurable based on the api docs here: http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilter.html.

I also added a tag library that will output the various statistics that are provided by the package found here: http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilterStats.html.  Of course the statsEnabled configuration must be set to true.

Here is a sample of a configuration that can go into your Config.groovy:

compress {
    // just in case for some reason you want to disable the filter
    enabled = true

    debug = false
    statsEnabled = true
    compressionThreshold = 1024
    // filter's url-patterns
    urlPatterns = ["/*"]
    // include and exclude are mutually exclusive
    includePathPatterns = []
    excludePathPatterns = [".*\\.gif", ".*\\.ico", ".*\\.jpg"]
    // include and exclude are mutually exclusive
    includeContentTypes = []
    excludeContentTypes = ["image/png"]
    // include and exclude are mutually exclusive
    includeUserAgentPatterns = []
    excludeUserAgentPatterns = [".*MSIE 4.*"]
    // probably don't want these, but their available if needed
    javaUtilLogger = ""
    jakartaCommonsLogger = ""

    development {
        debug = true
        compressionThreshold = 2048
    }
    production {
        statsEnabled = false
    }
}

Any environment specific configurations will override the defaults.  The plugin also functions just as it had when you released the plugin if there isn't a "compress" directive in Config.groovy

Thanks again for this nice piece of work.  You may or may not see the modifications as an improvement, but I figured I'd give back.

Thanks,
Kevin Burke


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RE: Compress Plugin v 0.2

Seymour Cakes
Hi,

Sorry for the lack of update -- my bad -- it's just I didn't have the time last week to finished it up. I wil get it done by this weekends.

Cheers,
sey

On Tue, Jun 17, 2008 at 10:07 AM, Peter Cold <[hidden email]> wrote:
What's the protocol for updating the plugin pages on the grails.org site?   The Compress page sure could benefit from the documentation below.  I know it's a wiki and I'd be happy to edit the page but don't want to step on any toes....



On Mon, Jun 9, 2008 at 1:26 AM, Seymour Cakes <[hidden email]> wrote:
HI All,

A very big thanks to Kevin Burke for some major improvements to the Compress Plugin.

I have update the plugin with his patch, but the plugin page is not updated yet. So for now I attached along Kevin's instructions for the improvement details.

Cheers
Sey

----------------------------------------------------------------------------------
Kevin Burke wrote:

I've made a few modifications that allow it to be more configurable based on the api docs here: http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilter.html.

I also added a tag library that will output the various statistics that are provided by the package found here: http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilterStats.html.  Of course the statsEnabled configuration must be set to true.

Here is a sample of a configuration that can go into your Config.groovy:

compress {
    // just in case for some reason you want to disable the filter
    enabled = true

    debug = false
    statsEnabled = true
    compressionThreshold = 1024
    // filter's url-patterns
    urlPatterns = ["/*"]
    // include and exclude are mutually exclusive
    includePathPatterns = []
    excludePathPatterns = [".*\\.gif", ".*\\.ico", ".*\\.jpg"]
    // include and exclude are mutually exclusive
    includeContentTypes = []
    excludeContentTypes = ["image/png"]
    // include and exclude are mutually exclusive
    includeUserAgentPatterns = []
    excludeUserAgentPatterns = [".*MSIE 4.*"]
    // probably don't want these, but their available if needed
    javaUtilLogger = ""
    jakartaCommonsLogger = ""

    development {
        debug = true
        compressionThreshold = 2048
    }
    production {
        statsEnabled = false
    }
}

Any environment specific configurations will override the defaults.  The plugin also functions just as it had when you released the plugin if there isn't a "compress" directive in Config.groovy

Thanks again for this nice piece of work.  You may or may not see the modifications as an improvement, but I figured I'd give back.

Thanks,
Kevin Burke


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Blogging Seymour Cakes
http://shitmores.blogspot.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RE: Compress Plugin v 0.2

Peter Cold
if anyone is using the compress plugin along with the debug plugin, adding the following to your DebugService will get you the compress stats on your debug/info page

        addCollector('compress') { request ->
            def stats = request.session.servletContext[CompressingFilterStats.STATS_KEY]
            traceVar(request, 'compress', "Compressed Responses", stats.numResponsesCompressed)
            traceVar(request, 'compress', "Not Compressed Responses", stats.totalResponsesNotCompressed)
            traceVar(request, 'compress', "Avg Response Compression Ratio", stats.responseAverageCompressionRatio)
            traceVar(request, 'compress', "Total Compressed Response Bytes", stats.responseCompressedBytes)
            traceVar(request, 'compress', "Total Input Response Bytes", stats.responseInputBytes)
            traceVar(request, 'compress', "Compressed Requests", stats.numRequestsCompressed)
            traceVar(request, 'compress', "Not Compressed Requests", stats.totalRequestsNotCompressed)
            traceVar(request, 'compress', "Avg Request Compression Ratio", stats.requestAverageCompressionRatio)
            traceVar(request, 'compress', "Total Compressed Request Bytes", stats.requestCompressedBytes)
            traceVar(request, 'compress', "Total Input Request Bytes", stats.requestInputBytes)
        }

also add: compress: "Compression Statistics" to the friendly names map in order to get a friendly name header for the stats

On Tue, Jun 17, 2008 at 3:13 AM, Seymour Cakes <[hidden email]> wrote:
Hi,

Sorry for the lack of update -- my bad -- it's just I didn't have the time last week to finished it up. I wil get it done by this weekends.

Cheers,
sey


On Tue, Jun 17, 2008 at 10:07 AM, Peter Cold <[hidden email]> wrote:
What's the protocol for updating the plugin pages on the grails.org site?   The Compress page sure could benefit from the documentation below.  I know it's a wiki and I'd be happy to edit the page but don't want to step on any toes....



On Mon, Jun 9, 2008 at 1:26 AM, Seymour Cakes <[hidden email]> wrote:
HI All,

A very big thanks to Kevin Burke for some major improvements to the Compress Plugin.

I have update the plugin with his patch, but the plugin page is not updated yet. So for now I attached along Kevin's instructions for the improvement details.

Cheers
Sey

----------------------------------------------------------------------------------
Kevin Burke wrote:

I've made a few modifications that allow it to be more configurable based on the api docs here: http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilter.html.

I also added a tag library that will output the various statistics that are provided by the package found here: http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilterStats.html.  Of course the statsEnabled configuration must be set to true.

Here is a sample of a configuration that can go into your Config.groovy:

compress {
    // just in case for some reason you want to disable the filter
    enabled = true

    debug = false
    statsEnabled = true
    compressionThreshold = 1024
    // filter's url-patterns
    urlPatterns = ["/*"]
    // include and exclude are mutually exclusive
    includePathPatterns = []
    excludePathPatterns = [".*\\.gif", ".*\\.ico", ".*\\.jpg"]
    // include and exclude are mutually exclusive
    includeContentTypes = []
    excludeContentTypes = ["image/png"]
    // include and exclude are mutually exclusive
    includeUserAgentPatterns = []
    excludeUserAgentPatterns = [".*MSIE 4.*"]
    // probably don't want these, but their available if needed
    javaUtilLogger = ""
    jakartaCommonsLogger = ""

    development {
        debug = true
        compressionThreshold = 2048
    }
    production {
        statsEnabled = false
    }
}

Any environment specific configurations will override the defaults.  The plugin also functions just as it had when you released the plugin if there isn't a "compress" directive in Config.groovy

Thanks again for this nice piece of work.  You may or may not see the modifications as an improvement, but I figured I'd give back.

Thanks,
Kevin Burke


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Blogging Seymour Cakes
http://shitmores.blogspot.com

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RE: Compress Plugin v 0.2

Robert Fischer
What's the "debug plugin"?

~~ Robert.

Peter Cold wrote:

> if anyone is using the compress plugin along with the debug plugin, adding
> the following to your DebugService will get you the compress stats on your
> debug/info page
>
>         addCollector('compress') { request ->
>             def stats =
> request.session.servletContext[CompressingFilterStats.STATS_KEY]
>             traceVar(request, 'compress', "Compressed Responses",
> stats.numResponsesCompressed)
>             traceVar(request, 'compress', "Not Compressed Responses",
> stats.totalResponsesNotCompressed)
>             traceVar(request, 'compress', "Avg Response Compression Ratio",
> stats.responseAverageCompressionRatio)
>             traceVar(request, 'compress', "Total Compressed Response Bytes",
> stats.responseCompressedBytes)
>             traceVar(request, 'compress', "Total Input Response Bytes",
> stats.responseInputBytes)
>             traceVar(request, 'compress', "Compressed Requests",
> stats.numRequestsCompressed)
>             traceVar(request, 'compress', "Not Compressed Requests",
> stats.totalRequestsNotCompressed)
>             traceVar(request, 'compress', "Avg Request Compression Ratio",
> stats.requestAverageCompressionRatio)
>             traceVar(request, 'compress', "Total Compressed Request Bytes",
> stats.requestCompressedBytes)
>             traceVar(request, 'compress', "Total Input Request Bytes",
> stats.requestInputBytes)
>         }
>
> also add: compress: "Compression Statistics" to the friendly names map in
> order to get a friendly name header for the stats
>
> On Tue, Jun 17, 2008 at 3:13 AM, Seymour Cakes <[hidden email]> wrote:
>
>> Hi,
>>
>> Sorry for the lack of update -- my bad -- it's just I didn't have the time
>> last week to finished it up. I wil get it done by this weekends.
>>
>> Cheers,
>> sey
>>
>>
>> On Tue, Jun 17, 2008 at 10:07 AM, Peter Cold <[hidden email]> wrote:
>>
>>> What's the protocol for updating the plugin pages on the grails.orgsite?   The Compress page sure could benefit from the documentation below.
>>> I know it's a wiki and I'd be happy to edit the page but don't want to step
>>> on any toes....
>>>
>>>
>>>
>>> On Mon, Jun 9, 2008 at 1:26 AM, Seymour Cakes <[hidden email]> wrote:
>>>
>>>> HI All,
>>>>
>>>> A very big thanks to Kevin Burke for some major improvements to the
>>>> Compress Plugin.
>>>>
>>>> I have update the plugin with his patch, but the plugin page is not
>>>> updated yet. So for now I attached along Kevin's instructions for the
>>>> improvement details.
>>>>
>>>> Cheers
>>>> Sey
>>>>
>>>>
>>>> ----------------------------------------------------------------------------------
>>>> Kevin Burke wrote:
>>>>
>>>> I've made a few modifications that allow it to be more configurable based
>>>> on the api docs here:
>>>> http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilter.html
>>>> .
>>>>
>>>> I also added a tag library that will output the various statistics that
>>>> are provided by the package found here:
>>>> http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilterStats.html.
>>>> Of course the statsEnabled configuration must be set to true.
>>>>
>>>> Here is a sample of a configuration that can go into your Config.groovy:
>>>>
>>>> compress {
>>>>     // just in case for some reason you want to disable the filter
>>>>     enabled = true
>>>>
>>>>     debug = false
>>>>     statsEnabled = true
>>>>     compressionThreshold = 1024
>>>>     // filter's url-patterns
>>>>     urlPatterns = ["/*"]
>>>>     // include and exclude are mutually exclusive
>>>>     includePathPatterns = []
>>>>     excludePathPatterns = [".*\\.gif", ".*\\.ico", ".*\\.jpg"]
>>>>     // include and exclude are mutually exclusive
>>>>     includeContentTypes = []
>>>>     excludeContentTypes = ["image/png"]
>>>>     // include and exclude are mutually exclusive
>>>>     includeUserAgentPatterns = []
>>>>     excludeUserAgentPatterns = [".*MSIE 4.*"]
>>>>     // probably don't want these, but their available if needed
>>>>     javaUtilLogger = ""
>>>>     jakartaCommonsLogger = ""
>>>>
>>>>     development {
>>>>         debug = true
>>>>         compressionThreshold = 2048
>>>>     }
>>>>     production {
>>>>         statsEnabled = false
>>>>     }
>>>> }
>>>>
>>>> Any environment specific configurations will override the defaults.  The
>>>> plugin also functions just as it had when you released the plugin if there
>>>> isn't a "compress" directive in Config.groovy
>>>>
>>>> Thanks again for this nice piece of work.  You may or may not see the
>>>> modifications as an improvement, but I figured I'd give back.
>>>>
>>>> Thanks,
>>>> Kevin Burke
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>
>> --
>> Blogging Seymour Cakes
>> http://shitmores.blogspot.com
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RE: Compress Plugin v 0.2

Peter Cold
http://grails.org/Debug+Plugin


On Tue, Jun 17, 2008 at 9:43 AM, Robert Fischer <[hidden email]> wrote:
What's the "debug plugin"?

~~ Robert.

Peter Cold wrote:
> if anyone is using the compress plugin along with the debug plugin, adding
> the following to your DebugService will get you the compress stats on your
> debug/info page
>
>         addCollector('compress') { request ->
>             def stats =
> request.session.servletContext[CompressingFilterStats.STATS_KEY]
>             traceVar(request, 'compress', "Compressed Responses",
> stats.numResponsesCompressed)
>             traceVar(request, 'compress', "Not Compressed Responses",
> stats.totalResponsesNotCompressed)
>             traceVar(request, 'compress', "Avg Response Compression Ratio",
> stats.responseAverageCompressionRatio)
>             traceVar(request, 'compress', "Total Compressed Response Bytes",
> stats.responseCompressedBytes)
>             traceVar(request, 'compress', "Total Input Response Bytes",
> stats.responseInputBytes)
>             traceVar(request, 'compress', "Compressed Requests",
> stats.numRequestsCompressed)
>             traceVar(request, 'compress', "Not Compressed Requests",
> stats.totalRequestsNotCompressed)
>             traceVar(request, 'compress', "Avg Request Compression Ratio",
> stats.requestAverageCompressionRatio)
>             traceVar(request, 'compress', "Total Compressed Request Bytes",
> stats.requestCompressedBytes)
>             traceVar(request, 'compress', "Total Input Request Bytes",
> stats.requestInputBytes)
>         }
>
> also add: compress: "Compression Statistics" to the friendly names map in
> order to get a friendly name header for the stats
>
> On Tue, Jun 17, 2008 at 3:13 AM, Seymour Cakes <[hidden email]> wrote:
>
>> Hi,
>>
>> Sorry for the lack of update -- my bad -- it's just I didn't have the time
>> last week to finished it up. I wil get it done by this weekends.
>>
>> Cheers,
>> sey
>>
>>
>> On Tue, Jun 17, 2008 at 10:07 AM, Peter Cold <[hidden email]> wrote:
>>
>>> What's the protocol for updating the plugin pages on the grails.orgsite?   The Compress page sure could benefit from the documentation below.
>>> I know it's a wiki and I'd be happy to edit the page but don't want to step
>>> on any toes....
>>>
>>>
>>>
>>> On Mon, Jun 9, 2008 at 1:26 AM, Seymour Cakes <[hidden email]> wrote:
>>>
>>>> HI All,
>>>>
>>>> A very big thanks to Kevin Burke for some major improvements to the
>>>> Compress Plugin.
>>>>
>>>> I have update the plugin with his patch, but the plugin page is not
>>>> updated yet. So for now I attached along Kevin's instructions for the
>>>> improvement details.
>>>>
>>>> Cheers
>>>> Sey
>>>>
>>>>
>>>> ----------------------------------------------------------------------------------
>>>> Kevin Burke wrote:
>>>>
>>>> I've made a few modifications that allow it to be more configurable based
>>>> on the api docs here:
>>>> http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilter.html
>>>> .
>>>>
>>>> I also added a tag library that will output the various statistics that
>>>> are provided by the package found here:
>>>> http://pjl-comp-filter.sourceforge.net/com/planetj/servlet/filter/compression/CompressingFilterStats.html.
>>>> Of course the statsEnabled configuration must be set to true.
>>>>
>>>> Here is a sample of a configuration that can go into your Config.groovy:
>>>>
>>>> compress {
>>>>     // just in case for some reason you want to disable the filter
>>>>     enabled = true
>>>>
>>>>     debug = false
>>>>     statsEnabled = true
>>>>     compressionThreshold = 1024
>>>>     // filter's url-patterns
>>>>     urlPatterns = ["/*"]
>>>>     // include and exclude are mutually exclusive
>>>>     includePathPatterns = []
>>>>     excludePathPatterns = [".*\\.gif", ".*\\.ico", ".*\\.jpg"]
>>>>     // include and exclude are mutually exclusive
>>>>     includeContentTypes = []
>>>>     excludeContentTypes = ["image/png"]
>>>>     // include and exclude are mutually exclusive
>>>>     includeUserAgentPatterns = []
>>>>     excludeUserAgentPatterns = [".*MSIE 4.*"]
>>>>     // probably don't want these, but their available if needed
>>>>     javaUtilLogger = ""
>>>>     jakartaCommonsLogger = ""
>>>>
>>>>     development {
>>>>         debug = true
>>>>         compressionThreshold = 2048
>>>>     }
>>>>     production {
>>>>         statsEnabled = false
>>>>     }
>>>> }
>>>>
>>>> Any environment specific configurations will override the defaults.  The
>>>> plugin also functions just as it had when you released the plugin if there
>>>> isn't a "compress" directive in Config.groovy
>>>>
>>>> Thanks again for this nice piece of work.  You may or may not see the
>>>> modifications as an improvement, but I figured I'd give back.
>>>>
>>>> Thanks,
>>>> Kevin Burke
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>    http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>
>> --
>> Blogging Seymour Cakes
>> http://shitmores.blogspot.com
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Loading...