]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Quick-fix to avoid creating unnecessarily large ArrayLists when adding inline ids...
authorAndreas L. Delmelle <adelmelle@apache.org>
Thu, 8 May 2008 23:46:45 +0000 (23:46 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Thu, 8 May 2008 23:46:45 +0000 (23:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@654654 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/area/IDTracker.java

index d073bdb94ebb12a6808a674404d419205f268841..e8b53b20c5e0ecc85579151e296c9d17c7a0f79a 100644 (file)
@@ -78,7 +78,11 @@ public class IDTracker {
                 tryIDResolution(id, pv, pvList);
             }
         } else {
-            pvList.add(pv);
+            /* TODO: The check is a quick-fix to avoid a waste 
+             * when adding inline-ids to the page */
+            if (!pvList.contains(pv)) {
+                pvList.add(pv);
+            }
         }
     }
 
@@ -140,7 +144,7 @@ public class IDTracker {
      * 
      * @param id ID to resolve
      * @param pv page viewport whose ID refs to resolve
-     * @param List of PageViewports
+     * @param pvList of PageViewports
      */
     private void tryIDResolution(String id, PageViewport pv, List pvList) {
         Set todo = (Set) unresolvedIDRefs.get(id);