[jira] [Comment Edited] (KARAF-5314) The performance of profile builder used by karaf maven plugin has reduced significantly in 4.1 compared to 4.0

2017-08-19 Thread Christian Schneider (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16134003#comment-16134003
 ] 

Christian Schneider edited comment on KARAF-5314 at 8/19/17 7:41 AM:
-

I am not sure if the streams API is the root of the problem. Instead I think 
the problem is that we repeatedly go through the features to find a match for a 
given feature/version.
So a cache is a good idea to speed this up.

Currently there are two cases for a version. The version can be open if only 
the name is given or the version is 0.0.0. In this case all versions would 
match. 
The other case is that a version is given. Then only this version would match.

The current code filters using a range which adds all matching features.
The code in the PR uses a cache that holds only one feature. So I am not sure 
this will always do the same thing.
 


was (Author: ch...@die-schneider.net):
I am not sure if the streams API is the root of the problem. Instead I think 
the problem is that we repeatedly go through the features to find a match for a 
given feature/version.
So a cache is a good idea to speed this up.

Currently there are two cases for a version. The version can be open if only 
the name is given or the version is 0.0.0. In this case all versions would 
match. 
The other case is that a version is given. Then only this version would match.

The current code filters using a range which would return add all matching 
features.
The code in the PR uses a cache that holds only one feature. So I am not sure 
this will always do the same thing.
 

> The performance of profile builder used by karaf maven plugin has reduced 
> significantly in 4.1 compared to 4.0
> --
>
> Key: KARAF-5314
> URL: https://issues.apache.org/jira/browse/KARAF-5314
> Project: Karaf
>  Issue Type: Bug
>Reporter: Vinay Shankar
> Fix For: 4.1.3
>
>
> The performance of profile builder used by karaf maven plugin has reduced 
> significantly in 4.1 compared to 4.0. 
> The java streams API is being used in 4.1 to filter our the required features 
> from the set of all features present in the repositories that are part of the 
> profile. This is done in the "addFeatures" method in the "Builder.java" class 
> in the "org.apache.karaf.profile.core" bundle. This change (from 4.0) has 
> drastically reduced the performance. For a profile with ~900 features in all 
> the repositories in the profile and ~300 required features from a highly 
> complex feature dependency tree, this function is taking around 13min to 
> complete. The same execution took around 3-5min in 4.0 (where simple for 
> loops were being used). 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KARAF-5314) The performance of profile builder used by karaf maven plugin has reduced significantly in 4.1 compared to 4.0

2017-08-19 Thread Christian Schneider (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16134003#comment-16134003
 ] 

Christian Schneider commented on KARAF-5314:


I am not sure if the streams API is the root of the problem. Instead I think 
the problem is that we repeatedly go through the features to find a match for a 
given feature/version.
So a cache is a good idea to speed this up.

Currently there are two cases for a version. The version can be open if only 
the name is given or the version is 0.0.0. In this case all versions would 
match. 
The other case is that a version is given. Then only this version would match.

The current code filters using a range which would return add all matching 
features.
The code in the PR uses a cache that holds only one feature. So I am not sure 
this will always do the same thing.
 

> The performance of profile builder used by karaf maven plugin has reduced 
> significantly in 4.1 compared to 4.0
> --
>
> Key: KARAF-5314
> URL: https://issues.apache.org/jira/browse/KARAF-5314
> Project: Karaf
>  Issue Type: Bug
>Reporter: Vinay Shankar
> Fix For: 4.1.3
>
>
> The performance of profile builder used by karaf maven plugin has reduced 
> significantly in 4.1 compared to 4.0. 
> The java streams API is being used in 4.1 to filter our the required features 
> from the set of all features present in the repositories that are part of the 
> profile. This is done in the "addFeatures" method in the "Builder.java" class 
> in the "org.apache.karaf.profile.core" bundle. This change (from 4.0) has 
> drastically reduced the performance. For a profile with ~900 features in all 
> the repositories in the profile and ~300 required features from a highly 
> complex feature dependency tree, this function is taking around 13min to 
> complete. The same execution took around 3-5min in 4.0 (where simple for 
> loops were being used). 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)