From b7013ed4255754328374d1bac1373bdafbc915c7 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 25 Mar 2016 15:31:53 +0000 Subject: [PATCH 1/1] JAL-2034 notes on efficiency --- src/jalview/gui/OverviewPanel.java | 3 +++ src/jalview/gui/SequenceRenderer.java | 1 + 2 files changed, 4 insertions(+) diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index 9be4fdb..c2a401d 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -295,6 +295,9 @@ public class OverviewPanel extends JPanel implements Runnable final boolean hasHiddenRows = av.hasHiddenRows(), hasHiddenCols = av .hasHiddenColumns(); boolean hiddenRow = false; + // get hidden row and hidden column map once at beginning. + // clone featureRenderer settings to avoid race conditions... if state is + // updated just need to refresh again for (row = 0; row < sequencesHeight; row++) { if (resizeAgain) diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index 258a229..17d69f4 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -91,6 +91,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer @Override public Color getResidueBoxColour(SequenceI seq, int i) { + // rate limiting step when rendering overview for lots of groups allGroups = av.getAlignment().findAllGroups(seq); if (inCurrentSequenceGroup(i)) -- 1.7.10.2