You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hervé Boutemy (JIRA)" <ji...@apache.org> on 2018/09/23 19:00:00 UTC
[jira] [Closed] (MRRESOURCES-94) Performance issue in
ProcessRemoteResourcesMojo.configureVelocityContext(...)
[ https://issues.apache.org/jira/browse/MRRESOURCES-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hervé Boutemy closed MRRESOURCES-94.
------------------------------------
Resolution: Fixed
Assignee: Hervé Boutemy
fixed by providing project* values lazily https://gitbox.apache.org/repos/asf?p=maven-remote-resources-plugin.git&a=commit&h=0f09659d52e0d6aa5af487a6c591c223cfafa34f
thank you Falko
> Performance issue in ProcessRemoteResourcesMojo.configureVelocityContext(...)
> -----------------------------------------------------------------------------
>
> Key: MRRESOURCES-94
> URL: https://issues.apache.org/jira/browse/MRRESOURCES-94
> Project: Maven Remote Resources Plugin
> Issue Type: Bug
> Affects Versions: 1.5
> Reporter: Falko Modler
> Assignee: Hervé Boutemy
> Priority: Major
> Fix For: 1.6.0
>
>
> I was wondering why our multi-threaded maven build of 80+ modules took so long even when excluding tests. I checked every plugin execution and to my surprise, {{maven-remote-resources-plugin}} was the number 1 consumer *before* compiler-plugin etc.
> We use {{maven-remote-resources-plugin}} just to exchange some few xml files among the modules, nothing spectacular!
> While debugging the plugin I found out that {{ProcessRemoteResourcesMojo.configureVelocityContext(VelocityContext context)}} may take *up to 30 seconds* for our project setup which is not acceptable.
> Almost certainly the problem is caused by the following project lookups (especially {{getProjects()}}):
> {noformat}
> List<MavenProject> projects = getProjects();
> context.put( "projects", projects );
> context.put( "projectsSortedByOrganization", getProjectsSortedByOrganization( projects ) );
> {noformat}
> As we do not use velocity templates at all, the solution for us was to patch the plugin to call {{configureVelocityContext(...)}} only on demand, not eagerly. Of course this won't help when using velocity templates...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)