This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3118 - Should an implementation of the language be allowed to perform caching?
Summary: Should an implementation of the language be allowed to perform caching?
Status: CLOSED FIXED
Alias: None
Product: XML Processing Model
Classification: Unclassified
Component: Pipeline language (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Norman Walsh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-13 07:36 UTC by Alessandro Vernet
Modified: 2011-02-23 20:27 UTC (History)
1 user (show)

See Also:


Attachments
Pipeline diagram (14.19 KB, image/png)
2006-04-13 07:37 UTC, Alessandro Vernet
Details

Description Alessandro Vernet 2006-04-13 07:36:40 UTC
To illustrate the question, let's consider the pipeline shown in the attached diagram. The first steps reads a stylesheet from a URI. It is fairly easy in this case for the implementation to do caching without impacting how the pipeline is executed. It unlikely that we want to prevent the implementation to perform caching at this level.

The question is more about the second step. Let's assume that for the pipeline an implementation is somehow able to determine that none of the input of "XSLT Step 1" have changed, that the stylesheet does not have any side effect, and so that a cached stylesheet for the second step. Should the implementation be allowed to used a cached copy of the stylesheet, and so not to execute step 1?
Comment 1 Alessandro Vernet 2006-04-13 07:37:17 UTC
Created attachment 417 [details]
Pipeline diagram
Comment 2 Innovimax 2006-04-13 09:38:11 UTC
I think not only the implementation has to be allowed to make some caching, but we should at least not prevent it, and in the optimal case, help this caching by letting the user give some hints in the pipeline instance document

Effectively, it depends on side effects, but if we link this to #3113 (external resource manager) we could precise some informations in this manager that help caching implementation

Secondely we should let a user set the fact that the step is side-effect-less (or almost as first approximation) to allow the implementation if it can to make some optimization
Comment 3 Norman Walsh 2006-04-19 14:48:17 UTC
I think I understand the question that you're asking, and I know what answer I want to give, but I don't see how your diagram illustrates the question.

It appears in your diagram that the stylesheet in step 1 *produces* the stylesheet used in step 2. Although I suppose it's possible that the result of this transformation is a stylesheet absolutely identical to the stylesheet that was input to step 1, that doesn't seem very likely.

Or do I missunderstand the diagram?
Comment 4 Alessandro Vernet 2006-04-20 01:08:34 UTC
Norm,

To clarify the question: if caching is possible, caching would happen on a second execution of the pipeline. I am not talking about the case where the first stylesheet produces a stylesheet which is exactly the same as the first stylesheet that produced it.

My question should have been phrased: should we allow a pipeline implementation not to execute the first stylesheet on the second execution of the pipeline if the pipeline implementation has cleverly determined that (a) doing so would produce the same document that was produced on the first execution of the pipeline and (b) the pipeline engine has this document available in cache?

Alex
Comment 5 Norman Walsh 2006-05-10 16:55:34 UTC
Per http://www.w3.org/XML/XProc/2006/05/04-minutes.html this is deemed a quality of implementation issue.