Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Amani Soysa
On Tue, Sep 4, 2012 at 2:41 PM, Afkham Azeez az...@wso2.com wrote: Amani, Reka, Please review the attached screenshot fix. Will fix it. Thanks Azeez -- *Afkham Azeez* Director of Architecture; WSO2, Inc.; http://wso2.com Member; Apache Software Foundation; http://www.apache.org/ *

Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Amani Soysa
Fixed this issue [1]. I have attached the patch to the following jira[1] [1] - https://wso2.org/jira/browse/CARBON-13859 On Tue, Sep 4, 2012 at 2:46 PM, Amani Soysa am...@wso2.com wrote: On Tue, Sep 4, 2012 at 2:41 PM, Afkham Azeez az...@wso2.com wrote: Amani, Reka, Please review the

Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Afkham Azeez
When I applied your patch, and tried to start the server, the server does not start. On Tue, Sep 4, 2012 at 3:19 PM, Amani Soysa am...@wso2.com wrote: Fixed this issue [1]. I have attached the patch to the following jira[1] [1] - https://wso2.org/jira/browse/CARBON-13859 On Tue, Sep 4,

Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Amila Maha Arachchi
Did you take a pack from builder and replaced a jar with a one built in your machine? Has it got something to do with the patch or does the bundle does not get activated? Some of us have faced a problem which the packs built from the builder doesn't get started when we replace the jars. I have

Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Amani Soysa
Yes there's something wrong with the packs coming from the builder ... you need to have your own build .. My fix was a simple fix where i remove the String replace, that should not have any impact on server startup. On Tue, Sep 4, 2012 at 6:44 PM, Amila Maha Arachchi ami...@wso2.com wrote: Did

Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Afkham Azeez
I built a tomcat ext jar with your fix replaced the original, and still server hangs at startup. Azeez On Tue, Sep 4, 2012 at 7:01 PM, Amani Soysa am...@wso2.com wrote: Yes there's something wrong with the packs coming from the builder ... you need to have your own build .. My fix was a

Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Afkham Azeez
On Tue, Sep 4, 2012 at 6:44 PM, Amila Maha Arachchi ami...@wso2.com wrote: Did you take a pack from builder and replaced a jar with a one built in your machine? Has it got something to do with the patch or does the bundle does not get activated? Some of us have faced a problem which the

Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Afkham Azeez
Anyway, how will the following improve performance? - serviceName = serviceName.replace(/, ); + serviceName = serviceName.substring(serviceName.indexOf('/')+1, serviceName.length()); On Tue, Sep 4, 2012 at 7:15 PM, Afkham Azeez az...@wso2.com wrote: I built a tomcat ext jar with your fix

Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Amani Soysa
On Tue, Sep 4, 2012 at 7:18 PM, Afkham Azeez az...@wso2.com wrote: Anyway, how will the following improve performance? Java String.replace uses regular expressions and can be slow, especially for large strings requiring many replacements. Therefore, i thought of using substring instead of

Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Amani Soysa
I have found a better way of improving the performance of String replace by using org.apache.commons.lang.StringUtils.replace(serviceName, /, );. And attached the jar file and the diff to the jira. For more information on String replace performance [1] [1] -

Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Afkham Azeez
Your previous fix works. Now the method takes only 0.6% of the total execution time. Azeez On Tue, Sep 4, 2012 at 8:00 PM, Amani Soysa am...@wso2.com wrote: I have found a better way of improving the performance of String replace by using

Re: [Dev] [URGENT] org.wso2.carbon.tomcat.ext.internal.Utils.getAppNameFromRequest has newly introduced 3.5% overhead to each request

2012-09-04 Thread Afkham Azeez
The StringUtils patch has resulted in an increase. Now it is 1.7% On Tue, Sep 4, 2012 at 8:15 PM, Afkham Azeez az...@wso2.com wrote: Your previous fix works. Now the method takes only 0.6% of the total execution time. Azeez On Tue, Sep 4, 2012 at 8:00 PM, Amani Soysa am...@wso2.com wrote: