Author: j16sdiz
Date: 2008-09-24 05:57:58 +0000 (Wed, 24 Sep 2008)
New Revision: 22792
Modified:
trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
Log:
set length before writeing -- this give better allocation on NTFS
Modified: trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
2008-09-24 04:56:26 UTC (rev 22791)
+++ trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
2008-09-24 05:57:58 UTC (rev 22792)
@@ -771,6 +771,9 @@
final long newHdLen = (headerBlockLength +
dataBlockLength + hdPadding) * storeFileSize;
if (preallocate) {
+ metaRAF.setLength(newMetaLen);
+ hdRAF.setLength(newHdLen);
+
byte[] b = new byte[4096];
ByteBuffer bf = ByteBuffer.wrap(b);