首先让我说我根本不知道XSLT.我有一项任务是调查在XSLT处理期间发生的Java OutOfMemory异常的一些JVM转储.
我发现OutOfMemory发生在递归XSLT处理期间(我们使用XALAN).
我发现令人震惊的是递归大于10万次.
在XSLT处理过程中这种深度递归可以接受的情况是什么?
请注意,线程堆栈跟踪大约300k行,并填充了此变体,直到OutOfMemory发生:
at org/apache/xalan/transformer/TransformerImpl.executeChildTemplates(Bytecode PC:150(Compiled Code))
at org/apache/xalan/templates/ElemElement.execute(Bytecode PC:352(Compiled Code))
at org/apache/xalan/transformer/TransformerImpl.executeChildTemplates(Bytecode PC:150(Compiled Code))