GitHub user lucaspouzac opened a pull request:

    https://github.com/apache/cxf/pull/49

    Optimisation usage of URLEncode / URLDecode to UrlUtils

    Hi, 
    
    I found an [old 
library](http://blogger.ziesemer.com/2009/09/markutils-codec-base64-url-bytechar.html)
 that optimizes usage of URLEncode and URLDecode.
    
    This library is under GPL licence. So, I added a portion of this code 
directly in cxf-core.
    
    I did some benchmark and below the results.
    
    ```
    Benchmark                                                    Mode  Samples  
      Score        Error   Units
    o.a.c.UrlUtilsBenchmark.testDecodeNew                       thrpt      100  
6879909,009 ± 117296,419   ops/s
    o.a.c.UrlUtilsBenchmark.testDecodeNew:@gc.count.profiled    thrpt      100  
   2395,000 ±        NaN  counts
    o.a.c.UrlUtilsBenchmark.testDecodeNew:@gc.count.total       thrpt      100  
    730,000 ±        NaN  counts
    o.a.c.UrlUtilsBenchmark.testDecodeNew:@gc.time.profiled     thrpt      100  
   8288,000 ±        NaN      ms
    o.a.c.UrlUtilsBenchmark.testDecodeNew:@gc.time.total        thrpt      100  
   2532,000 ±        NaN      ms
    o.a.c.UrlUtilsBenchmark.testDecodeOld                       thrpt      100  
5805570,177 ± 131254,628   ops/s
    o.a.c.UrlUtilsBenchmark.testDecodeOld:@gc.count.profiled    thrpt      100  
   2433,000 ±        NaN  counts
    o.a.c.UrlUtilsBenchmark.testDecodeOld:@gc.count.total       thrpt      100  
    745,000 ±        NaN  counts
    o.a.c.UrlUtilsBenchmark.testDecodeOld:@gc.time.profiled     thrpt      100  
   8415,000 ±        NaN      ms
    o.a.c.UrlUtilsBenchmark.testDecodeOld:@gc.time.total        thrpt      100  
   2649,000 ±        NaN      ms
    o.a.c.UrlUtilsBenchmark.testEncodeNew                       thrpt      100  
8054882,333 ± 194851,987   ops/s
    o.a.c.UrlUtilsBenchmark.testEncodeNew:@gc.count.profiled    thrpt      100  
   2779,000 ±        NaN  counts
    o.a.c.UrlUtilsBenchmark.testEncodeNew:@gc.count.total       thrpt      100  
    860,000 ±        NaN  counts
    o.a.c.UrlUtilsBenchmark.testEncodeNew:@gc.time.profiled     thrpt      100  
   9874,000 ±        NaN      ms
    o.a.c.UrlUtilsBenchmark.testEncodeNew:@gc.time.total        thrpt      100  
   3062,000 ±        NaN      ms
    o.a.c.UrlUtilsBenchmark.testEncodeOld                       thrpt      100  
3710430,547 ±  79856,593   ops/s
    o.a.c.UrlUtilsBenchmark.testEncodeOld:@gc.count.profiled    thrpt      100  
   2428,000 ±        NaN  counts
    o.a.c.UrlUtilsBenchmark.testEncodeOld:@gc.count.total       thrpt      100  
    766,000 ±        NaN  counts
    o.a.c.UrlUtilsBenchmark.testEncodeOld:@gc.time.profiled     thrpt      100  
   9105,000 ±        NaN      ms
    o.a.c.UrlUtilsBenchmark.testEncodeOld:@gc.time.total        thrpt      100  
   2867,000 ±        NaN      ms
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lucaspouzac/cxf 3.0.x-fixes

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf/pull/49.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #49
    
----
commit c49f24fee9977a471716d50bf8b351703983d67e
Author: Lucas Pouzac <[email protected]>
Date:   2015-01-07T16:27:48Z

    Optimisation usage of URLEncode / URLDecode to UrlUtils

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to