Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance degrade after upgrading plugin #230

Open
lukavucko opened this issue May 20, 2019 · 5 comments
Open

performance degrade after upgrading plugin #230

lukavucko opened this issue May 20, 2019 · 5 comments

Comments

@lukavucko
Copy link

upgrading from 4.4.9 to to any higher version causes serious performance degrade. For publishing 600 projects it lasts 10 minutes longer than usual. Also this task is org.jfrog.gradle.plugin.artifactory.task.DeployTask is executing, which was not a case before.

Build scan examples:
Version  4 4 9

Version 4 9 6

@eyalbe4
Copy link
Contributor

eyalbe4 commented May 20, 2019

@lukavucko,

Can you see which task takes longer now?
How can we see this performance degradation?

As for the DeployTask, we added it in order to resolve a concurrency issue. Before the DeployTask, one of the artifactoryTask tasks used be elected, to perform the deployment. The approach was to elect the last tasl to run. However, in parallel mode, this election process was not consistent anymorte and caused issues. The newly added DeployTask completely resolved this issue.

@lukavucko
Copy link
Author

lukavucko commented May 20, 2019

You can see on two pictures above.
On first picture you can see that task artifactoryDeploy takes 24 min to execute.
On second picture you can see that task artifactoryPublish takes 14 min to execute.
With new updating of artifactoryPlugin to 4.9.6 I have new task artifactoryDeploy which takes 24 min and it is 10 minutes longer than artifactoryPublish task which is in older version of artifactoryPlugin.
Also for info, I had to update artifactoryPluginVersion cuz I updated gradle version from 3.5 to 5.4

@eyalbe4
Copy link
Contributor

eyalbe4 commented May 21, 2019

@lukavucko,
Assuming that the results you see are consistent, the only thing that comes to mind, which can explain this change, is that perhaps you were using the parallel execution of gradle. This causes some of the tasks to run in parallel, which lead to faster deployment.
Now that all the deployment is performed by one task, which depends on all the other tasks to finish their execution, the deployment is sequential.
Could this be the cause what you're seeing?

@lukavucko
Copy link
Author

Maybe it is the case what you said, thank you for your answer.
I will investigate that.

@lukavucko
Copy link
Author

lukavucko commented May 22, 2019

After some tests we found out the performance problem is not related with the versions.
The problem is with Gradle 5.4 we are not able anymore to get rid of builtOn dependencies on publications artifacts. The reason for getting rid of these dependencies is performance issue.
You can see here how we cut the builtOn dependencies:

        gradle.projectsEvaluated {
            rootProject.allprojects { p ->
                p.pluginManager.withPlugin('maven-publish') {
                    p.publishing.publications.each { pub ->
                        logger.debug("-- Disable builtBy on artifacts of publication '${pub.name}'.")
                        pub.artifacts.each { artifact ->
                            artifact.buildDependencies.setValues([]) -- in Gradle 5.4 the model is read only
                        }
                    }
                }
            }
        }

On these two pictures you can see the results:

with_cutting_dependencies

without_cutting

Build scan pictures show the differences between cutting and without cutting:
Build scan_with_cutting

Build scan_without_cutting

We have exactly the same scenario after the upgrade on Gradle 5.4 and artifactoryPluginVersion 4.9.6.

Is it possible to configure publications artifacts without builtOn dependencies in some other way? Because in this line: artifact.buildDependencies.setValues([]), the model in Gradle 5.4 is read only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants