On Saturday 18 April 2009 14:58:48 j16sdiz at freenetproject.org wrote: > Author: j16sdiz > Date: 2009-04-18 13:58:48 +0000 (Sat, 18 Apr 2009) > New Revision: 26965 > > Modified: > trunk/freenet/src/freenet/io/comm/Message.java > Log: > Relex loadFactor, trade memory for CPU > > We are nolonger running short of memory, > this change reduce copying and rehashing.
A Message's fields are never changed once set, does this change anything? They are also usually very few. > > Modified: trunk/freenet/src/freenet/io/comm/Message.java > =================================================================== > --- trunk/freenet/src/freenet/io/comm/Message.java 2009-04-18 13:54:03 UTC (rev 26964) > +++ trunk/freenet/src/freenet/io/comm/Message.java 2009-04-18 13:58:48 UTC (rev 26965) > @@ -60,7 +60,7 @@ > private final MessageType _spec; > private final WeakReference<? extends PeerContext> _sourceRef; > private final boolean _internal; > - private final HashMap<String, Object> _payload = new HashMap<String, Object>(8, 1.0F); // REDFLAG at the moment memory is more of an issue than CPU so we use a high load factor > + private final HashMap<String, Object> _payload = new HashMap<String, Object>(8); > private List<Message> _subMessages; > public final long localInstantiationTime; > final int _receivedByteCount; -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 835 bytes Desc: This is a digitally signed message part. URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20090428/857ce749/attachment.pgp>