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

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

--- Comment #3 from Morrita Hajime <morrita@google.com> ---
(In reply to Gabor Krizsanits from comment #1)
> I think we still need to chew on this for a while, maybe in the end the more
> conservative blocking fetch will be the way to go. For example if we parse
> an import that looks something like:
> 
> script1
> subimport1
> script3
> 
> in script blocking mode. And then we want to unblock the scripts in it, we
> should unblock it until it gets to subimport1, and then re-block it. Unblock
> subimport1 and wait until it's all done. Then run script 3... It's quite
> hard to think over what is going on... 

I think <link rel=stylesheet> behaves like this.
It blocks <script> and it doesn't block anything else.

> The more or I think the better I like
> the blocking on the fetching level or at least on the parsing level.

In my understanding, <script> behaves like that way because the script
execution should be completely serialized and the order should be
deterministic. <link rel=stylesheet>, on the other hand, behaves differently.
There is no loader ordering constraint for stylesheet, so it is loaded as it is
available.

HTML import is a mix of these two. As long as parser doesn't see <script>,
there is no order constraint. Once it sees any script, it blocks until the
newly introduced order constraint is resolved.

> I think when there is at least one link in the list that is not ready to be
> fetched, we have to run the 'find next to be fetched algorithm' after each
> import that is done loading. The algorithm will find the first link on the
> list whose flag can be changed from not ready to ready to be fetched and
> start fetching it (if there is any). Is that correct? 
> And of course when a new link is added to the list that is immediately ready
> to be fetched we just fetch it.
> 

A possible problem of "find next" approach is that it embodies order
serialization. If we spec in this way, it will be hard to explain concurrency
of the process.

At the same time, it might be clearer to make it explicit that when we
recompute the readiness and unblock parsers. As you are suggesting, it would be
when each import finished loading.

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

Received on Friday, 14 February 2014 02:19:49 UTC