You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/08/25 16:26:32 UTC

svn commit: r240079 - /xmlgraphics/fop/trunk/test/java/org/apache/fop/visual/BatchDiffer.java

Author: jeremias
Date: Thu Aug 25 07:26:28 2005
New Revision: 240079

URL: http://svn.apache.org/viewcvs?rev=240079&view=rev
Log:
After chasing a phantom for hours, it looks like it's simply the big images being generated that eat over 90% of the memory and at some point cause an OutOfMemoryError. Releasing the bitmaps a little sooner now which helps a little. "-Xmx256m" is still a good idea for BatchDiffer.
Haven't found any memory leaks inside FOP, since I fixed the image cache.

Modified:
    xmlgraphics/fop/trunk/test/java/org/apache/fop/visual/BatchDiffer.java

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/visual/BatchDiffer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/visual/BatchDiffer.java?rev=240079&r1=240078&r2=240079&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/visual/BatchDiffer.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/visual/BatchDiffer.java Thu Aug 25 07:26:28 2005
@@ -201,7 +201,9 @@
                     BufferedImage diff = BitmapComparator.buildDiffImage(bitmaps[0], bitmaps[k]);
                     outputFile = new File(targetDir, f.getName() + "._diff" + k + ".png");
                     saveAsPNG(diff, outputFile);
+                    bitmaps[k] = null;
                 }
+                bitmaps[0] = null;
                 maxfiles = (maxfiles < 0 ? maxfiles : maxfiles - 1);
                 if (maxfiles == 0) {
                     break;
@@ -252,7 +254,10 @@
             Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
             BatchDiffer differ = new BatchDiffer();
             differ.runBatch(cfgFile);
+            
+            System.out.println("Regular exit...");
         } catch (Exception e) {
+            System.out.println("Exception caugth...");
             e.printStackTrace();
         }
     }



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