xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adelme...@apache.org
Subject svn commit: r654654 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java
Date Thu, 08 May 2008 23:46:45 GMT
Author: adelmelle
Date: Thu May  8 16:46:45 2008
New Revision: 654654

URL: http://svn.apache.org/viewvc?rev=654654&view=rev
Log:
Quick-fix to avoid creating unnecessarily large ArrayLists when adding inline ids to the page

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java?rev=654654&r1=654653&r2=654654&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/IDTracker.java Thu May  8 16:46:45
2008
@@ -78,7 +78,11 @@
                 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 @@
      * 
      * @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);



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message