aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2008-05-08 23:46:45 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2008-05-08 23:46:45 +0000
commit8e7dceedd34226cfe8d6fc922186d5d4c3c6c1e3 (patch)
tree6586e195f6421e35737272cec0a88eb29e9e0cce /src/java/org
parentf54710eda526c851973299ebdf30ef5a67c65b63 (diff)
downloadxmlgraphics-fop-8e7dceedd34226cfe8d6fc922186d5d4c3c6c1e3.tar.gz
xmlgraphics-fop-8e7dceedd34226cfe8d6fc922186d5d4c3c6c1e3.zip
Quick-fix to avoid creating unnecessarily large ArrayLists when adding inline ids to the page
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@654654 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/area/IDTracker.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/area/IDTracker.java b/src/java/org/apache/fop/area/IDTracker.java
index d073bdb94..e8b53b20c 100644
--- a/src/java/org/apache/fop/area/IDTracker.java
+++ b/src/java/org/apache/fop/area/IDTracker.java
@@ -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);