From 5b833c4ea17f7e45fe1532b36219fcbfba3c0e4a Mon Sep 17 00:00:00 2001 From: hansonr Date: Sat, 3 Aug 2019 22:41:20 -0500 Subject: [PATCH] JAL-3383 JAL-3253-applet -- Adds FileStoreI interface -- Makes FileStore.java abstract superclass for FileStoreImpl (for Java) and FileStoreJS (for JavaScript) -- Passing all FeatureStoreJSTest TestNG tests -- Passing all SequenceFeatureTest TestNG tests -- About 10% faster for Java on TestNG tests. -- full rendering in < 250 ms for JavaScript -- this is approximately 15 times faster than before I started this experiment. Platform: timer mark 13.396 0.209 overviewrender 16000 pixels row:14 redraw:false Platform: timer mark 14.884 0.186 overviewrender 16000 pixels row:14 redraw:false Platform: timer mark 15.989 0.185 overviewrender 16000 pixels row:14 redraw:false Platform: timer mark 17.216 0.229 overviewrender 16000 pixels row:14 redraw:false Platform: timer mark 18.148 0.239 overviewrender 16000 pixels row:14 redraw:false Platform: timer mark 18.924 0.198 overviewrender 16000 pixels row:14 redraw:false Platform: timer mark 21.827 0.233 overviewrender 16000 pixels row:14 redraw:false --- src/jalview/renderer/seqfeatures/FeatureRenderer.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/jalview/renderer/seqfeatures/FeatureRenderer.java b/src/jalview/renderer/seqfeatures/FeatureRenderer.java index ee5ffe6..9988076 100644 --- a/src/jalview/renderer/seqfeatures/FeatureRenderer.java +++ b/src/jalview/renderer/seqfeatures/FeatureRenderer.java @@ -26,6 +26,7 @@ import jalview.datamodel.ContiguousI; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; import jalview.util.Comparison; +import jalview.util.Platform; import jalview.viewmodel.seqfeatures.FeatureRendererModel; import java.awt.AlphaComposite; @@ -438,9 +439,9 @@ public class FeatureRenderer extends FeatureRendererModel findAllFeatures(); } - @SuppressWarnings("unused") - private List overlaps = (/** @j2sNative true || */ - false ? null : new ArrayList<>()); + private List overlaps = (Platform.isJS() + ? new ArrayList<>() + : null); /** * Returns the sequence feature colour rendered at the given column position, -- 1.7.10.2