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

Karl Pauls resolved FELIX-5363.
-------------------------------
       Resolution: Fixed
    Fix Version/s: framework-5.8.0

I did some testing on my local machine having some 25 threads create and 
connect about 4M urls in a tight loop and yes, while my system has 8 cores it 
never gets above 400%. 

I reworked the URLHandlers and related classes all the way down to the service 
lookup to be lock free on the lookup up path (i.e., the one needed for URL 
creation and usage) and now the test runs in about half the time. More 
importantly, it does max out all my cores - in other words, it probably would 
do even better with more cores available. 

As the ct and some other tests I run still pass I committed this in r1762242. 

Please try it out and if it works for you close this issue - otherwise, feel 
free to reopen with updated info on performance problems.

In any case, good catch - this is definitely a good improvement. Thanks!

> new URL(string) suffers under concurrency
> -----------------------------------------
>
>                 Key: FELIX-5363
>                 URL: https://issues.apache.org/jira/browse/FELIX-5363
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-5.4.0
>            Reporter: Rob Ryan
>            Assignee: Karl Pauls
>             Fix For: framework-5.8.0
>
>         Attachments: Merged-callees.csv
>
>
> Under moderate concurrency (25threads) and frequent use of new 
> java.net.URL(string) a bottleneck was seen with yourkit.  In one test 
> involving HTML page generation new URL(url) was seen to take 20% of time (via 
> yourkit).
> This was tracked to 
> org.apache.felix.framework.URLHandlers.getFrameworkFromContext() 
> URLHandlers.java which accounted for 99% of the time used by new URL(url).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to