I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit a5f5cad0 authored by zzz's avatar zzz
Browse files

Console: Reduce memory usage in BanlistRenderer

OOM seen on one box
parent 456586a8
No related branches found
No related tags found
No related merge requests found
Pipeline #2285 passed
......@@ -32,7 +32,7 @@ class BanlistRenderer {
}
public void renderStatusHTML(Writer out) throws IOException {
StringBuilder buf = new StringBuilder(1024);
StringBuilder buf = new StringBuilder(2048);
Map<Hash, Banlist.Entry> entries = new TreeMap<Hash, Banlist.Entry>(HashComparator.getInstance());
entries.putAll(_context.banlist().getEntries());
......@@ -79,6 +79,10 @@ class BanlistRenderer {
.append("#unsh\" title=\"").append(unban).append("\">[").append(unban).append("]</a>");
}
buf.append("</li>\n");
if (buf.length() > 1024) {
out.append(buf);
buf.setLength(0);
}
}
buf.append("</ul>\n");
out.append(buf);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment