JAL-3981 strategic newlines to help speed up Java's html parser
authorJim Procter <j.procter@dundee.ac.uk>
Thu, 24 Mar 2022 17:02:10 +0000 (17:02 +0000)
committerJim Procter <j.procter@dundee.ac.uk>
Thu, 24 Mar 2022 17:02:10 +0000 (17:02 +0000)
src/jalview/gui/PopupMenu.java
src/jalview/io/SequenceAnnotationReport.java

index fcd8171..6903034 100644 (file)
@@ -1817,7 +1817,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener
       contents.append("<p><h2>" + MessageManager.formatMessage(
               "label.create_sequence_details_report_annotation_for",
               new Object[]
-              { seq.getDisplayId(true) }) + "</h2></p><p>");
+              { seq.getDisplayId(true) }) + "</h2></p>\n<p>");
       new SequenceAnnotationReport(false).createSequenceAnnotationReport(
               contents, seq, true, true, ap.getSeqPanel().seqCanvas.fr);
       contents.append("</p>");
index c5bc902..369839a 100644 (file)
@@ -493,6 +493,7 @@ public class SequenceAnnotationReport
       sb.append(tmp);
       maxWidth = Math.max(maxWidth, tmp.length());
     }
+    sb.append("\n");
     SequenceI ds = sequence;
     while (ds.getDatasetSequence() != null)
     {
@@ -503,6 +504,7 @@ public class SequenceAnnotationReport
     {
       maxWidth = Math.max(maxWidth, appendDbRefs(sb, ds, summary));
     }
+    sb.append("\n");
 
     /*
      * add non-positional features if wanted
@@ -576,7 +578,7 @@ public class SequenceAnnotationReport
       countForSource++;
       if (countForSource == 1 || !summary)
       {
-        sb.append("<br/>");
+        sb.append("<br/>\n");
       }
       if (countForSource <= MAX_REFS_PER_SOURCE || !summary)
       {