From 25008f6fd7150baf5626e878affebcd111bcf695 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 7 Jun 2018 09:05:11 +0100 Subject: [PATCH] JAL-3020 small optimisation if max cache size reached --- src/jalview/datamodel/features/FeatureAttributes.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jalview/datamodel/features/FeatureAttributes.java b/src/jalview/datamodel/features/FeatureAttributes.java index d126402..60916ae 100644 --- a/src/jalview/datamodel/features/FeatureAttributes.java +++ b/src/jalview/datamodel/features/FeatureAttributes.java @@ -232,6 +232,10 @@ public class FeatureAttributes terms = new HashSet<>(); } int count = terms.size(); + if (count >= MAX_ATT_VALS) + { + return; + } StringTokenizer st = new StringTokenizer(value, TERM_DELIMITERS); while (st.hasMoreTokens() && count < MAX_ATT_VALS) { -- 1.7.10.2