felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Closed: (FELIX-2605) FilterHandler should pre-compile regular expression
Date Tue, 08 Feb 2011 09:47:57 GMT

     [ https://issues.apache.org/jira/browse/FELIX-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Felix Meschberger closed FELIX-2605.
------------------------------------


Close issues after release

> FilterHandler should pre-compile regular expression
> ---------------------------------------------------
>
>                 Key: FELIX-2605
>                 URL: https://issues.apache.org/jira/browse/FELIX-2605
>             Project: Felix
>          Issue Type: Improvement
>          Components: HTTP Service
>    Affects Versions: http-2.0.4
>            Reporter: David Hay
>            Assignee: Carsten Ziegeler
>             Fix For: http-2.2.0
>
>         Attachments: FilterHandler.java-regexp.patch
>
>
> The implementation of FilterHandler has a potential performance problem.  Each time the
"handle" method is called, it goes through a matching process that includes the following
code:
> return uri.matches(this.pattern)
> The problem is that this compiles the regular expression every time this method is called,
a potentially expensive operation.
> The pattern should be compiled using Pattern.compile and then re-used for each call to
"matches" as follows:
> return this.regex.matcher(uri).matches();

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message