问题描述
下面是链接到我的文件,的,的
喜
我转换XML转换成HTML。我的XML文件是关于10KB大,我的XSLT 70KB和10KB左右的大输出HTML。
I am transforming xml into html. My xml file is about 10kb big and my xslt 70kb and output html about 10kb big.
Transformer xformer = StylesheetCache.newTransformer(templateFile);
xformer.transform(new DOMSource(outlineDoc),new StreamResult(out));
变压器的创造需要10s左右,为什么我创建缓存把它降低到300毫秒如果缓存创建多数民众赞成。该转换线需要3秒来执行。现在是这样长。我已经写在Windows Mobile相似变换和它的执行时间是大约LT = 1秒
The creating of the transformer takes about 10s to create thats why i created cache that bring it down to 300ms if its cached. The transform line takes 3s to execute. Now is this long. I have written similar transforms on windows mobile and it execution time is about <=1s
我改变了的TransformerFactory撒克逊但结果却是大致相同的。
I changed the TransformerFactory to Saxon but the result was about the same.
感谢
推荐答案
我发现这个问题......我想我需要踢自己。我在家里用我的手机打,所以我决定与应用有点玩。一下子在init负荷就像1和后续调用像500毫秒。所以在这一点上,我难住了。所以我拿出我的笔记本插上我的手机和调试,并全部suddend这又是12s的。我是该死的IDE。只要我通过ecclipse运行它,它会减慢到12秒。
I found the problem... I think i need to kick myself. I was at home playing with my phone so i decided to play with the app a bit. and all of a sudden the init load was like 1s and subsequent calls like 500ms. So at this point i was stumped. i so pulled out my laptop plugged my phone in and debugged and all of a suddend it was 12s again. i was the freaking IDE. as soon as i run it through ecclipse it slows down to 12s.
: - \\
这篇关于XSLT转化性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!