W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2010

Re: Calabash: cache the compiled pipeline

From: Florent Georges <fgeorges@fgeorges.org>
Date: Thu, 18 Nov 2010 11:03:37 +0000
Message-ID: <AANLkTi=HLMuW405ZtPhJF_qs_5+6LMG62+a-dD9qEKAo@mail.gmail.com>
To: Norman Walsh <ndw@nwalsh.com>
Cc: XProc Dev <xproc-dev@w3.org>
On 17 November 2010 21:29, Norman Walsh wrote:


> Assuming I wanted to make caching compiled pipeline easier in
> V2, what would you suggest?

  From a user point of view, I think all I want is something
similar to the model introduced by JAXP and extended by S9API:
you compile the pipeline to an in-memory representation of the
pipeline, without anything supporting a specific one evaluation
(like the JAXP's Templates, or Saxon's XsltExecutable).

  Then from this compiled pipeline, you get a runtime object, an
object which is based on the compiled pipeline, with in addition
everything needed to its evaluation (like the JAXP's Transformer,
or Saxon's XsltTransformer).  This object cannot be reused, and
cannot be used from within several threads.  Basically you can
only do:

    evaluator = compiled.getEvaluator();
    // here, can set options, inputs, etc.
    // here, can use output, etc.
    // after, have to throw the evaluator object away

  Whilst the compiled object can be compiled only once then used
by several threads at several times to get different evaluator

  But I am not going to explain to you how JAXP works :-)

> [1] http://norman.walsh.name/2010/11/11/xprocpipes

  BTW, it seems your server is down...


Florent Georges
Received on Thursday, 18 November 2010 11:04:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:07 UTC