[jira] [Comment Edited] (FOP-2863) performance problem with openjdk 11

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Comment Edited] (FOP-2863) performance problem with openjdk 11

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/FOP-2863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16843782#comment-16843782 ]

zouari edited comment on FOP-2863 at 5/20/19 8:49 AM:
------------------------------------------------------

[^input.fo]

Hello,
 to do the conversion fo to png, I use this java code:
{code:java}
public static void main(String[] args) throws SAXException, IOException, TransformerException {

FopFactory fopFactory = FopFactory.newInstance(new File(".").toURI());
OutputStream out = new BufferedOutputStream(new FileOutputStream(new File("D:/output/myfile.png")));
try {
Fop fop = fopFactory.newFop(MimeConstants.MIME_PNG, out);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
Source src = new StreamSource(new File("D:/output/input.fo"));
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);
} finally {
out.close();
}

}{code}
with jdk 1.8, the conversion (fo to png) takes 8 seconds.
 with openjdk-11.0.2 ([https://jdk.java.net/archive/]), the conversion (fo to png) takes 24 seconds.

thank you.


was (Author: nour-eddine):
[^input.fo]

Hello,
to do the conversion fo to png, I use this java code:
{code:java}
public static void main(String[] args) throws SAXException, IOException, TransformerException {
DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
Date date = new Date();
System.out.println(dateFormat.format(date));

FopFactory fopFactory = FopFactory.newInstance(new File(".").toURI());
OutputStream out = new BufferedOutputStream(new FileOutputStream(new File("D:/output/myfile.png")));
try {
Fop fop = fopFactory.newFop(MimeConstants.MIME_PNG, out);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
Source src = new StreamSource(new File("D:/output/input.fo"));
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);
} finally {
out.close();
}

date = new Date();
System.out.println(dateFormat.format(date));
}{code}
with jdk 1.8, the conversion (fo to png) takes 8 seconds.
with openjdk-11.0.2 ([https://jdk.java.net/archive/]), the conversion (fo to png) takes 24 seconds.

thank you.

> performance problem with openjdk 11
> -----------------------------------
>
>                 Key: FOP-2863
>                 URL: https://issues.apache.org/jira/browse/FOP-2863
>             Project: FOP
>          Issue Type: Bug
>          Components: image/png
>    Affects Versions: 2.2, 2.3
>            Reporter: zouari
>            Priority: Major
>         Attachments: input.fo
>
>
> Hello,
> I use apache fop 2.3.
> I want to convert a "fo" to "png".
> with openjdk 8, the conversion is done in 8 seconds.
> with openjdk 11, the conversion is done in 43 seconds.
> there is a performance problem.
> you can explain to me the problem.
> thank you.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)