[Bug 24658] [imports]: The fetch readiness shouldn't block fetching.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24658

--- Comment #8 from Morrita Hajime <morrita@google.com> ---
(In reply to Gabor Krizsanits from comment #6)
> Ah yeah, I keep saying tree when it's not... But it does not matter much
> really, the tree we are looking for is well defined and part of the directed
> graph of imports. Only extension to my algorithm that while we are looking
> for the left most child we build up a list form the parent chain (that we
> have to anyway because of the multiple parents) and check if the next first
> child is in this list already. If so, we found a circle, we just ignore that
> link and check for the next child or if there is no more child we're done,
> we found the leaf node we were looking for in the sub-tree. This way the
> alg. will traverse the graph as if it were a tree, ignoring exactly the
> edges that make circles. For de-dup we have to add one more thing to it:
> step to the next one when the referred import is already started/unblocked.

So I added explicit cycle check in the new revision for the clarity. By
excluding cycles, the final DAG is almost deterministic, although its interim
shape could be different depending on the network state. De-dup will work as
well because we split requesting and fetching. Basically, fetching is for
detecting the dup.

I think we share the understanding in this part. What we might need to discuss
more is how to define the "order" of fetching and/or
script execution.

The new revision only defines the criteria of blocking script. It means that
the loading of imports can happen in parallel: It is OK to start loading as
soon as the parser sees <link rel=import>. What we need to do for determinisity
is:

- Make sure that de-dup works by checking import-map before fetching (as
specified in the algorithm).
- Make sure that the dependent criteria blocks script execution and never
over-unblock them.

Ensuring these, the script execution order is stay deterministic and locking
delay can be minimized at the same time. We don't need to define "the next" or
order of import in general: Everything can happen concurrently, blocking script
takes are of ordering.

Well, I admit that stylesheet ordering across imports (cascading order) will
need some more. My plan is to define it on top of the DAG instead of modifying
it. See bug 24616 for this.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 19 February 2014 00:29:45 UTC