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

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

2011-02-08 Thread Darin Adler
This thread is wrong for webkit-dev. The discussion obliquely related to WebKit development and you are not yet contributors to the WebKit project yet. Could you please find somewhere else to discuss this? -- Darin ___ webkit-dev mailing list webk

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

2011-02-08 Thread Silvio Ventres
Let's take each argument apart one by one: 1. If the plugin, W3 Total Cache for WordPress, by itself moves the script loads after the main content, there will be no visible change using heuristic. 1a. In the plugin installation guide, the developers advise on either using a CDN or "static.*" subd

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

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 an

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 another

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 intereste

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 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 doe

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 wa

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 c

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 f

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 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 behavior). http://c

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 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, 2=CDN, 3=external > d

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 defaul

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 wrot

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 prioritizati

[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 it