【问题标题】:MULE: Xquery transformer performance issuesMULE:Xquery 转换器性能问题
【发布时间】:2013-02-01 21:39:30
【问题描述】:

我有一个接收 XML 请求的流。 然后我调用一个 jdbc 出站端点,对 Oracle 数据库执行查询。 然后使用 xquery 转换器将查询结果转换为 XML 并发送回。 数据库中的 sql 最多返回 50 000 行,但由 xquery 转换器创建的 XML 文件每行有 60 行,导致 XML 文件非常大(15-100 MB)。 Mule 花了很长时间“映射/创建”XML 文件,我想知道我是否可以以某种方式加快这个过程,或者我是否必须重新考虑我的方法。

问候,

马格纳斯

【问题讨论】:

    标签: xquery mule


    【解决方案1】:

    Zorba 提供 JDBC 连接器和流功能:http://www.zorba-xquery.com/ 它可能正是您正在寻找的。​​p>

    【讨论】:

      【解决方案2】:

      直接来自Mule的documentation

      Efficient Transformations with DelayedResult
      
      Mule contains a special XML output format called DelayedResult. This format allows very efficient XML transformations by delaying any XML serialization until an OutputStream is available.
      
      For example, here is an XSLT transformer set up to use DelayedResult:
      
      <mxml:xslt-transformer name="transform-in" 
                             xsl-file="xslt/transform.xslt"
                             returnClass="org.mule.module.xml.transformer.DelayedResult"/>
      
      If the result of this transformation were being sent to an HTTP client, the HTTP client would ask Mule for an OutputHandler and pass in the OutputStream to it. Only then would Mule perform the transformation, writing the output directly to the OutputStream.
      
      If DelayedResult were not used, the XML result would first be written to an in-memory buffer before being written to the OutputStream. This will cause your XML processing to be slower.
      

      因此,使用 XSLT 转换器而不是 XQuery 转换器更有意义。

      【讨论】:

        猜你喜欢
        • 2017-07-16
        • 1970-01-01
        • 1970-01-01
        • 2013-10-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-08-27
        • 1970-01-01
        相关资源
        最近更新 更多