From: gmungoc Date: Thu, 7 Jun 2018 08:05:11 +0000 (+0100) Subject: JAL-3020 small optimisation if max cache size reached X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Ffeatures%2FJAL-3020attributeValuePrompting;p=jalview.git JAL-3020 small optimisation if max cache size reached --- 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) {