Bug 34308 - [PATCH] memory and file descriptor leaks when using images
Summary: [PATCH] memory and file descriptor leaks when using images
Status: CLOSED WONTFIX
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: images (show other bugs)
Version: 0.20.5
Hardware: All other
: P1 critical
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords: PatchAvailable
: 30156 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-05 18:21 UTC by Tino Schwarze
Modified: 2012-04-01 13:50 UTC (History)
1 user (show)



Attachments
The image cache gets a min, minsize, max and maxsize paramters; streams are closed (18.96 KB, patch)
2005-04-05 18:24 UTC, Tino Schwarze
Details | Diff
src/org/apache/fop/image/ImageCacheEntry.java (6.50 KB, patch)
2005-04-06 08:52 UTC, Tino Schwarze
Details | Diff
Improved patch for an LRU cache which cleans up (25.95 KB, patch)
2005-07-13 16:23 UTC, Tino Schwarze
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tino Schwarze 2005-04-05 18:21:11 UTC
When using lots of images, FOP consumes lots of memory because the image cache
is not cleared.

Further, streams are not closed properly when loading images.
Comment 1 Tino Schwarze 2005-04-05 18:24:05 UTC
Created attachment 14622 [details]
The image cache gets a min, minsize, max and maxsize paramters; streams are closed

The patch has been tested in production heavliy.
Comment 2 Tino Schwarze 2005-04-05 18:25:32 UTC
*** Bug 30156 has been marked as a duplicate of this bug. ***
Comment 3 Tino Schwarze 2005-04-06 08:52:56 UTC
Created attachment 14629 [details]
src/org/apache/fop/image/ImageCacheEntry.java

The file was missing from the patch because there seems to be no way to get a
"cvs diff" with new files which have not been added to CVS yet (because I've
got no write access).
Comment 4 Tino Schwarze 2005-07-13 16:23:45 UTC
Created attachment 15661 [details]
Improved patch for an LRU cache which cleans up

Now complete patch, with ImageCacheEntry and everything. It has also been
reworked to use a LinkedHashMap for storing the cache entries.

Further, a setCacheMap method has been added (this will be used within
http://www.open-eis.com/ to supply an implementation which integrates into the
caching framework of open-EIS).
Comment 5 Simon Pepping 2006-10-09 08:00:57 UTC
Timo,

We do not apply patches to the 0.20.5 branch. IIRC, on the development branch
work has been done on image caching. If you feel that your work is useful for
the development branch as well, we will be grateful for a new patch.

Simon
Comment 6 Tino Schwarze 2006-10-10 08:56:37 UTC
Sorry, we're not going to use the new FOP anytime soon, so I cannot test it.
If we switch to the new FOP, we'll probably take care of this.
Comment 7 Glenn Adams 2012-04-01 13:50:43 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs