Author: j16sdiz
Date: 2008-04-09 06:38:28 +0000 (Wed, 09 Apr 2008)
New Revision: 19101
Modified:
trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
Log:
performance: use ArrayList instead of Vector
Modified: trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2008-04-09
05:25:58 UTC (rev 19100)
+++ trunk/freenet/src/freenet/store/BerkeleyDBFreenetStore.java 2008-04-09
06:38:28 UTC (rev 19101)
@@ -8,8 +8,9 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.RandomAccessFile;
+import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Vector;
+import java.util.List;
import org.tanukisoftware.wrapper.WrapperManager;
@@ -585,11 +586,11 @@
}
private void maybeSlowShrink(boolean dontCheckForHoles, boolean
inStartUp) throws DatabaseException, IOException {
- Vector wantedKeep = new Vector(); // keep; content is wanted,
and is in the right place
- Vector unwantedIgnore = new Vector(); // ignore; content is not
wanted, and is not in the right place
- Vector wantedMove = new Vector(); // content is wanted, but is
in the wrong part of the store
- Vector unwantedMove = new Vector(); // content is not wanted,
but is in the part of the store we will keep
- Vector alreadyDropped = new Vector(); // any blocks past the
end which have already been truncated, but which there are still database
blocks pointing to
+ List wantedKeep = new ArrayList(); // keep; content is wanted,
and is in the right place
+ List unwantedIgnore = new ArrayList(); // ignore; content is
not wanted, and is not in the right place
+ List wantedMove = new ArrayList(); // content is wanted, but is
in the wrong part of the store
+ List unwantedMove = new ArrayList(); // content is not wanted,
but is in the part of the store we will keep
+ List alreadyDropped = new ArrayList(); // any blocks past the
end which have already been truncated, but which there are still database
blocks pointing to
Cursor c = null;
Transaction t = null;