From f50d45678e64061caadb64f1ba1f2d2c85e67d09 Mon Sep 17 00:00:00 2001 From: borg-0300 Date: Thu, 15 Sep 2005 22:41:24 +0000 Subject: [PATCH] better values for BIG directory's git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@734 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/CacheAdmin_p.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htroot/CacheAdmin_p.java b/htroot/CacheAdmin_p.java index 4dcb0292b..578f60bd1 100644 --- a/htroot/CacheAdmin_p.java +++ b/htroot/CacheAdmin_p.java @@ -85,7 +85,6 @@ public class CacheAdmin_p { String pathString = ((post == null) ? "" : post.get("path", "/")); final String fileString = pathString; - // we dont need check the path, because we have do that in plasmaSwitchboard.java - Borg-0300 final File cache = new File(switchboard.getConfig("proxyCache", "DATA/HTCACHE")); File dir; @@ -102,8 +101,8 @@ public class CacheAdmin_p { // generate sorted dir/file listing final StringBuffer tree = new StringBuffer("Directory of
").append((pathString.length() == 0) ? "domain list" : linkPathString(pathString)).append("

"); - final List dList = new ArrayList(50); - final List fList = new ArrayList(20); + final List dList = new ArrayList(500); + final List fList = new ArrayList(200); final String[] list = dir.list(); File object; if (list == null) { @@ -121,6 +120,7 @@ public class CacheAdmin_p { } Iterator iter = dList.iterator(); String str; + tree.ensureCapacity((dList.size() + fList.size() + 2) * 255); if (dList.size() > 1) { Collections.sort(dList); try { @@ -142,7 +142,7 @@ public class CacheAdmin_p { } } - final StringBuffer info = new StringBuffer(); + final StringBuffer info = new StringBuffer(8192); if ((action.equals("info")) && (!file.isDirectory())) { final String urls = htmlFilterContentScraper.urlNormalform(url);