From 59138a3581a29dc6f708101f851153cbe23fe7f6 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 14 Dec 2013 04:11:44 +0000 Subject: [PATCH] * cache compiled patterns --- .../filebot/media/ReleaseInfo.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/source/net/sourceforge/filebot/media/ReleaseInfo.java b/source/net/sourceforge/filebot/media/ReleaseInfo.java index 78346860..a08edeba 100644 --- a/source/net/sourceforge/filebot/media/ReleaseInfo.java +++ b/source/net/sourceforge/filebot/media/ReleaseInfo.java @@ -193,7 +193,7 @@ public class ReleaseInfo { } } } - volumeRoots = volumes; + volumeRoots = unmodifiableSet(volumes); } return volumeRoots; } @@ -271,15 +271,20 @@ public class ReleaseInfo { return anidbIndexResource.get(); } + private Map seriesDirectMappings; + public Map getSeriesDirectMappings() throws IOException { - Map mappings = new LinkedHashMap(); - for (String line : seriesDirectMappingsResource.get()) { - String[] tsv = line.split("\t", 2); - if (tsv.length == 2) { - mappings.put(compile("(? mappings = new LinkedHashMap(); + for (String line : seriesDirectMappingsResource.get()) { + String[] tsv = line.split("\t", 2); + if (tsv.length == 2) { + mappings.put(compile("(?