You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Ate Douma (JIRA)" <je...@portals.apache.org> on 2005/08/04 16:19:36 UTC

[jira] Created: (JS2-322) Maven project inheritance causes serious performance problems with ant project replaceProperties method

Maven project inheritance causes serious performance problems with ant project replaceProperties method
-------------------------------------------------------------------------------------------------------

         Key: JS2-322
         URL: http://issues.apache.org/jira/browse/JS2-322
     Project: Jetspeed 2
        Type: Bug
  Components: Project Build  
    Versions: 2.0-M4    
 Environment: Maven 1.0.2, Ant 1.5.3-1 (as used by maven 1.0.2), SUN JDK 1.5.0_04-b05
    Reporter: Ate Douma
 Assigned to: Ate Douma 
     Fix For: 2.0-M4


I found out that running plugin j2:db.create.test was taking much more time (> 40 secs) than I was used to (about 10 secs)
And, this became very problematic when I fixed the plugin j2:genapp.portal goal to be able to run the above goal for my custom portal: down to > 2 min.
The differentiating factor between these two setups, after hours and hours searching,  turned out to be the recently introduced maven project inheritance.
First I thought it had something to do with the classpath/classloaders or something.
But, even when I removed all dependencies (except the jdbc driver), the performance drain was still there.

Finally, when I decided to debug the ant SQLExec task this morning I found the culprit: the way maven handles and presents its (Jelly) properties
to ant. The SQLExec task invokes (ant) project.replaceProperties(String) for every line in an sql script.
When I dumped the current project.properties to a file it turned out to be 125Kb in size!
Looking at the dump, the killer was parentScope: about 108Kb only for that one property. 

Once I found this out, the solution was rather simple.
Just before the sql task invocation in the plugin I put the following:
   <j:set var="parentScope" scope="parent" value=""/>
And performance is back: 8 (!) seconds now for j2:db.create.test

If this is a sound fix or one big ugly hack, I don't know (I'm not a Maven/Jelly expert) but it sure solves it.

Hopefully maven 2 won't have these problems anymore...

Note: the above mentioned plugin genapp goal fix is part of my plugin changes proposal JS2-319.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Resolved: (JS2-322) Maven project inheritance causes serious performance problems with ant project replaceProperties method

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-322?page=all ]
     
Ate Douma resolved JS2-322:
---------------------------

    Resolution: Fixed

Fix committed

> Maven project inheritance causes serious performance problems with ant project replaceProperties method
> -------------------------------------------------------------------------------------------------------
>
>          Key: JS2-322
>          URL: http://issues.apache.org/jira/browse/JS2-322
>      Project: Jetspeed 2
>         Type: Bug
>   Components: Project Build
>     Versions: 2.0-M4
>  Environment: Maven 1.0.2, Ant 1.5.3-1 (as used by maven 1.0.2), SUN JDK 1.5.0_04-b05
>     Reporter: Ate Douma
>     Assignee: Ate Douma
>      Fix For: 2.0-M4

>
> I found out that running plugin j2:db.create.test was taking much more time (> 40 secs) than I was used to (about 10 secs)
> And, this became very problematic when I fixed the plugin j2:genapp.portal goal to be able to run the above goal for my custom portal: down to > 2 min.
> The differentiating factor between these two setups, after hours and hours searching,  turned out to be the recently introduced maven project inheritance.
> First I thought it had something to do with the classpath/classloaders or something.
> But, even when I removed all dependencies (except the jdbc driver), the performance drain was still there.
> Finally, when I decided to debug the ant SQLExec task this morning I found the culprit: the way maven handles and presents its (Jelly) properties
> to ant. The SQLExec task invokes (ant) project.replaceProperties(String) for every line in an sql script.
> When I dumped the current project.properties to a file it turned out to be 125Kb in size!
> Looking at the dump, the killer was parentScope: about 108Kb only for that one property. 
> Once I found this out, the solution was rather simple.
> Just before the sql task invocation in the plugin I put the following:
>    <j:set var="parentScope" scope="parent" value=""/>
> And performance is back: 8 (!) seconds now for j2:db.create.test
> If this is a sound fix or one big ugly hack, I don't know (I'm not a Maven/Jelly expert) but it sure solves it.
> Hopefully maven 2 won't have these problems anymore...
> Note: the above mentioned plugin genapp goal fix is part of my plugin changes proposal JS2-319.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org