[CVS nanning] decreased memory usage by setting initial capacity of the interceptor caches to 1
Lecando Shared <[email protected]> Fri, 29 Aug 2003 10:20:31 -0500
| Newsgroups | gmane.comp.java.nanning.devel |
|---|---|
| Message-ID | <200308291520.h7TFKV906032__39236.8138338954$1062169783@hogshead.codehaus.org> |
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>nanning/src/main/org/codehaus/nanning</tt></b> on <span id="info">MAIN</span></td></tr>
<tr><td><tt><a href="#file1">AspectInstance.java</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-6</td><td nowrap="nowrap" align="center">1.2 -> 1.3</td></tr>
<tr class="alt"><td><tt><a href="#file2">Mixin.java</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center">1.1 -> 1.2</td></tr>
<tr><td></td><td align="right" id="added">+9</td><td align="right" id="removed">-9</td><td></td></tr>
</table>
<small id="info">2 modified files</small><br />
<pre class="comment">
decreased memory usage by setting initial capacity of the interceptor caches to 1
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">nanning/src/main/org/codehaus/nanning<br /></span>
<div class="fileheader"><big><b>AspectInstance.java</b></big> <small id="info">1.2 -> 1.3</small></div>
<pre class="diff"><small id="info">diff -u -r1.2 -r1.3
--- AspectInstance.java 12 Jul 2003 16:48:16 -0000 1.2
+++ AspectInstance.java 29 Aug 2003 15:20:31 -0000 1.3
@@ -36,20 +36,20 @@
</small></pre><pre class="diff" id="context"> instance.addMixin(mixin);
</pre></code>
*
</pre><pre class="diff" id="removed">- * <!-- $Id: AspectInstance.java,v 1.<span id="removedchars">2 2003/07/12 16:48:16</span> lecando Exp $ -->
</pre><pre class="diff" id="added">+ * <!-- $Id: AspectInstance.java,v 1.<span id="addedchars">3 2003/08/29 15:20:31</span> lecando Exp $ -->
</pre><pre class="diff" id="context"> *
* @author $Author: lecando $
</pre><pre class="diff" id="removed">- * @version $Revision: 1.<span id="removedchars">2</span> $
</pre><pre class="diff" id="added">+ * @version $Revision: 1.<span id="addedchars">3</span> $
</pre><pre class="diff" id="context"> */
public final class AspectInstance implements InvocationHandler, Serializable {
static final long serialVersionUID = 5462785783512485056L;
</pre><pre class="diff" id="removed">- private Map mixins = new HashMap();
- private List mixinsList = new ArrayList();
</pre><pre class="diff" id="added">+ private Map mixins = new HashMap(1);
+ private List mixinsList = new ArrayList(1);
</pre><pre class="diff" id="context"> private Class classIdentifier;
private Object proxy;
</pre><pre class="diff" id="removed">- private transient List constructionInterceptors = new ArrayList();
</pre><pre class="diff" id="added">+ private transient List constructionInterceptors = new ArrayList(<span id="addedchars">1</span>);
</pre><pre class="diff" id="context"> private transient AspectFactory aspectFactory;
public AspectInstance() {
</pre><pre class="diff"><small id="info">@@ -309,7 +309,7 @@
</small></pre><pre class="diff" id="context"> */
public void addConstructionInterceptor(ConstructionInterceptor constructionInterceptor) {
if (constructionInterceptors == null) {
</pre><pre class="diff" id="removed">- constructionInterceptors = new ArrayList();
</pre><pre class="diff" id="added">+ constructionInterceptors = new ArrayList(<span id="addedchars">1</span>);
</pre><pre class="diff" id="context"> }
constructionInterceptors.add(constructionInterceptor);
}
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">nanning/src/main/org/codehaus/nanning<br /></span>
<div class="fileheader"><big><b>Mixin.java</b></big> <small id="info">1.1 -> 1.2</small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- Mixin.java 12 Jul 2003 16:48:16 -0000 1.1
+++ Mixin.java 29 Aug 2003 15:20:31 -0000 1.2
@@ -34,10 +34,10 @@
</small></pre><pre class="diff" id="context"> }
</code></pre>
*
</pre><pre class="diff" id="removed">- * <!-- $Id: Mixin.java,v 1.<span id="removedchars">1 2003/07/12 16:48:16</span> lecando Exp $ -->
</pre><pre class="diff" id="added">+ * <!-- $Id: Mixin.java,v 1.<span id="addedchars">2 2003/08/29 15:20:31</span> lecando Exp $ -->
</pre><pre class="diff" id="context"> *
* @author $Author: lecando $
</pre><pre class="diff" id="removed">- * @version $Revision: 1.<span id="removedchars">1</span> $
</pre><pre class="diff" id="added">+ * @version $Revision: 1.<span id="addedchars">2</span> $
</pre><pre class="diff" id="context"> */
public class Mixin implements Serializable {
static final long serialVersionUID = 7386027290257587762L;
</pre><pre class="diff"><small id="info">@@ -92,7 +92,7 @@
</small></pre><pre class="diff" id="context"> }
List interceptors = (List) methodInterceptors.get(method);
if (interceptors == null) {
</pre><pre class="diff" id="removed">- interceptors = new ArrayList();
</pre><pre class="diff" id="added">+ interceptors = new ArrayList(<span id="addedchars">1</span>);
</pre><pre class="diff" id="context"> methodInterceptors.put(method, interceptors);
}
return interceptors;
</pre></div>
</body></html>