You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xmlgraphics.apache.org by bu...@apache.org on 2012/04/07 21:14:09 UTC
DO NOT REPLY [Bug 53046] New: image session context lacks control
over retained sources leading to excessive memory usage by image sources
https://issues.apache.org/bugzilla/show_bug.cgi?id=53046
Bug #: 53046
Summary: image session context lacks control over retained
sources leading to excessive memory usage by image
sources
Product: XMLGraphicsCommons
Version: Trunk
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Utilities
AssignedTo: general@xmlgraphics.apache.org
ReportedBy: glenn@skynav.com
Classification: Unclassified
see https://issues.apache.org/bugzilla/show_bug.cgi?id=49621
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 53046] image session context lacks control over
retained sources leading to excessive memory usage by image sources
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53046
--- Comment #3 from Dominik Stadler <do...@gmx.at> 2012-04-11 15:19:12 UTC ---
I have worked around this via the following helper method which iterates over
any image that was used for creating a PDF with FOP and tries to get the
related source and closes it.
public static void cleanupFOAgentImages(final Collection<String> images,
final FOUserAgent foUserAgent) {
for(String image : images) {
if(logger.isLoggable(Level.FINE)) {
logger.fine("Try to remove file: file:///" + image + " from FOP
image session context."); //$NON-NLS-1$ //$NON-NLS-2$
}
ImageSessionContext imageCtx =
foUserAgent.getImageSessionContext();
if(imageCtx instanceof AbstractImageSessionContext) {
AbstractImageSessionContext aImageCtx =
(AbstractImageSessionContext)imageCtx;
Source src = aImageCtx.getSource(BaseConstants.FILE_PROTOCOL +
image);
// use helper method which does the correct close for all types
of Source, e.g. StreamSource, ImageSource, ...
// this also handles src==null gracefully.
ImageUtil.closeQuietly(src);
}
}
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 53046] image session context lacks control over
retained sources leading to excessive memory usage by image sources
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53046
Glenn Adams <gl...@skynav.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dominik.stadler@gmx.at
--- Comment #1 from Glenn Adams <gl...@skynav.com> 2012-04-07 19:15:31 UTC ---
*** Bug 49621 has been marked as a duplicate of this bug. ***
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
[Bug 53046] Image session context lacks control over retained
sources leading to excessive memory usage by image sources
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53046
Glenn Adams <ga...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|image session context lacks |Image session context lacks
|control over retained |control over retained
|sources leading to |sources leading to
|excessive memory usage by |excessive memory usage by
|image sources |image sources
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 53046] image session context lacks control over
retained sources leading to excessive memory usage by image sources
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53046
Glenn Adams <ga...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #2 from Glenn Adams <ga...@apache.org> 2012-04-10 22:22:39 UTC ---
dominik, if you would like to submit a patch that addresses this issue, i will
endeavor to apply it asap; otherwise, i will shortly move this to
resolved+later due to lack of action
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org