Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-12 Thread Silvio Ventres
Finished testing a small patch: https://bugs.webkit.org/show_bug.cgi?id=54108 It only prioritizes script loading in body (not sure yet why doesn't work in head). Assuming most external-load slowdowns are caused by js from body vs anything from head, this should fix most horrific worst cases.

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-08 Thread Silvio Ventres
This argument - web developer is to blame for choosing a slow ad/tracking/etc server - is incorrect. Web developers in general do not have any control over the ad provider or, frankly, any other type of external functionality provider. Google Analytics being a good point in case, you would not

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-08 Thread Tony Gentilcore
Your test case isn't really about prioritization. The HTML5 spec defines very specifically when parsing must stop. The two main cases are: 1. Waiting for an external script to download 2. Waiting for an external stylesheet to download when any script block is reached In these cases, the parser

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-08 Thread Jerry Seeger
My argument is less it's the Web developer's fault than it is the Web developer should have control. I am hardly a sophisticated Web developer but I have javascript from a different domain that must be loaded first and I have Google analytics, which I should load after the rest of the page

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-08 Thread Silvio Ventres
Do you have any example of scripts or css that are externally sourced, and where developer cares to reasonably optimize the web page? The main use case of such external scripts currently is ads and statistics gatherers for analysis. This, arguably, is not critical content that the user is

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-08 Thread Silvio Ventres
Indeed, the test case just shows the general problem. It should be changed to include scripts/css sourced from different places: same-subdomain, same-domain, cross-domain, CDN. Of course, right now there will be no difference between those. The bug you filed considers the same problem from

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-08 Thread Jerry Seeger
I'm still fiddling with the scripts on muddledramblings.com after a redesign, but I intend to move static resources to a cookieless domain to improve performance. This is a petty common tactic - sort of a poor man's CDN. The key is that I can decide to do this. (Yes, I could rearrange my site

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-08 Thread Jerry Seeger
Sorry - the WordPress plugin is W3 Total Cache, not W3 Super Cache. I always get those names scrambled. Jerry On Feb 8, 2011, at 10:40 AM, Jerry Seeger wrote: I'm still fiddling with the scripts on muddledramblings.com after a redesign, but I intend to move static resources to a cookieless

[webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-07 Thread Silvio Ventres
Hello. Can someone point where in the source code is the implementation of the subresources loading and some documentation regarding its implementation - as a queue or just child-threads or async functions? The reason is that the current subresource loading seems to lack any prioritization and

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-07 Thread Adam Barth
There is already some amount of code that's involved with prioritizing subresource loads. See http://trac.webkit.org/browser/trunk/Source/WebCore/loader/ResourceLoadScheduler.h and http://trac.webkit.org/browser/trunk/Source/WebCore/loader/cache/CachedResourceLoader.h. I suspect the

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-07 Thread Nate Chapin
The default prioritization is found here: http://trac.webkit.org/browser/trunk/Source/WebCore/loader/cache/CachedResource.cpp#L51. There are cases where we override this (e.g., I'm pretty sure we load favicons at a lower priority than other images) On Mon, Feb 7, 2011 at 11:44 AM, Adam Barth

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-07 Thread Silvio Ventres
The function doesn't seem to get any information regarding domain the resource is hosted at. Calling some kind of setResourceDomainType() to set DOMAIN_TYPE to enum(0=main domain, 1=subdomain within same domain, 2=CDN, 3=external domain) and then providing that as an additional parameter to

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-07 Thread Adam Barth
On Mon, Feb 7, 2011 at 12:18 PM, Silvio Ventres silvio.vent...@gmail.com wrote: The function doesn't seem to get any information regarding domain the resource is hosted at. Calling some kind of setResourceDomainType() to set DOMAIN_TYPE to enum(0=main domain, 1=subdomain within same domain,

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-07 Thread Mihai Parparita
On Mon, Feb 7, 2011 at 12:32 PM, Adam Barth aba...@webkit.org wrote: There is no PerformanceTest framework that deals with network latency.  Please feel encouraged to build one.  :) Note that http://code.google.com/p/web-page-replay/ was created with this goal (to simulate realistic network

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-07 Thread Silvio Ventres
IE/Opera are delaying only for 4 seconds, same as Mobile Safari The reason looks to be the url for the script/css. If the url is the same twice, Chrome/Firefox serializes the requests, while IE/Opera/MobileSafari launches both requests simultaneously. Of course, requesting simultaneously doesn't

Re: [webkit-dev] Question regarding priorities of subresource content retrieval

2011-02-07 Thread Jerry Seeger
I'm reasonably sure that javascript in the header must be loaded synchronously, as it might affect the rest of the load. This is why tools like YSlow advise Web designers to move javascript loads that are not needed for rendering until after the rest of the page loads. Blocking on loading the