Calabash: cache the compiled pipeline

  Hi,

  I am using Calabash in a web application, which calls repeatedly
the same pipeline (BTW, what is the idiomatic expression: to call
a pipeline? to evaluate a pipeline?)  So I would like to cache
the compiled representation of the pipeline, and instantiate only
the runtime object for each invocation.

  Let me make an analogy with the Saxon S9API.  I have exactly
one Processor object for the whole application: there is no need
to instantiate it every time.  I also have one XsltExecutable per
stylesheet (resp. one XQueryExecutable per query): the "compiled"
object.  And for every request I instantiate one XsltTransformer
(resp. one XQueryEvaluator) object, and evaluate it.

  It is not clear to me what object is usable as a "singleton"
(more or less), like the Saxon Processor object.  I know I cannot
use XPipeline as a shareable compiled object, but it is not clear
what (nor whether) I can use instead.

  Is it possible to cache a compiled pipeline?

  Regards,

-- 
Florent Georges
http://fgeorges.org/

Received on Wednesday, 17 November 2010 09:58:02 UTC