From 8dc955542d8ec28050307898888f3596e7115c42 Mon Sep 17 00:00:00 2001 From: Felix Bergmann Date: Tue, 7 Apr 2020 09:45:18 +0200 Subject: [PATCH] Introduce buffering in HashChunkletManager Improve the performance by introducing buffering. The current usage of FileInputStream and ObjectInputStream don't use buffering. --- .../com/gmail/nossr50/util/blockmeta/HashChunkletManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java b/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java index f591cdafa..0302f5de3 100755 --- a/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java +++ b/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java @@ -346,7 +346,7 @@ public class HashChunkletManager implements ChunkletManager { try { fileIn = new FileInputStream(location); - objIn = new ObjectInputStream(fileIn); + objIn = new ObjectInputStream(new BufferedInputStream(fileIn)); storeIn = (ChunkletStore) objIn.readObject(); } catch (IOException ex) {