Author: mkleint Date: Tue Apr 22 02:27:45 2008 New Revision: 650427 URL: http://svn.apache.org/viewvc?rev=650427&view=rev Log: getKey() is used many-many-many times when loading projects. it's ineffective to construct the key each time. Ideally the cached key would get reste when groupId or artifactId gets set, I didn't figure how to do it in modello though..
Modified: maven/components/trunk/maven-model/src/main/mdo/maven.mdo Modified: maven/components/trunk/maven-model/src/main/mdo/maven.mdo URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model/src/main/mdo/maven.mdo?rev=650427&r1=650426&r2=650427&view=diff ============================================================================== --- maven/components/trunk/maven-model/src/main/mdo/maven.mdo (original) +++ maven/components/trunk/maven-model/src/main/mdo/maven.mdo Tue Apr 22 02:27:45 2008 @@ -3008,12 +3008,18 @@ return executionMap; } + //TODO we shall reset key variable when groupId/artifactId change + private String key = null; /** * @return the key of the plugin, ie <code>groupId:artifactId</code> */ public String getKey() { - return constructKey( groupId, artifactId ); + if ( key == null ) + { + key = constructKey( groupId, artifactId ); + } + return key; } /**