Implementing Navigation Timing in WebKit using libsoup
- From: Zan Dobersek <zandobersek gmail com>
- To: libsoup-list gnome org
- Subject: Implementing Navigation Timing in WebKit using libsoup
- Date: Wed, 23 Feb 2011 22:25:57 +0100
Greetings,
I'm working on bringing support to the Gtk port of WebKit for the Navigation Timing specification[1]. The port uses libsoup as it's default networking backend and there are some obstacles I've stumbled upon that I'd like to overcome with your help.
To explain a bit, the PerformanceTiming[2] interface, defined in the specification, offers plenty of attributes that contain the time at which specific events in the page loading occured. There is a demo application[3] �available that further illustrates what benefit this specification brings. The demo should work in Chromium as well as Firefox.
In WebKit, the document loading infrastructure takes care of setting most of attributes to current time except the following:
domainLookupStart
domainLookupEnd
connectStart
connectEnd
secureConnectionStart
requestStart
responseStart
These attributes should be set in the process of acquiring the resources, but that process is backend-specific. For the Gtk port, it is performed in the ResourceHandle class[4].
Now, the first two listed attributes are not important, beacuse at the moment the domain lookup is not performed when loading a page. The rest of the attributes should be set when the corresponding events occur.
The current, work-in-progress patch (available at�
the WebKit bugzilla, bug #42432[5]) only sets the requestStart and responseStart attributes.
The requestStart attribute is being set just before calling soup_request_send_async, and it so ignores the connecting phase that is covered by the connectStart and connectEnd attrbiutes. It should actually be set just prior to starting the request in the libsoup library and not before calling the aforementioned function.
The responseStart (receiveHeadersEnd variable in the patch) is set when callback, which was passed to soup_request_send_async, is called. I think this is a proper place for this action, but I do not know how precise the time is using this method.
My question is, how would one acquire the time of other events - connectStart, connectEnd, secureConnectionStart and perhaps even the domainLookup* attributes, if it ever comes to performing domain lookup?
I've looked upon signals that can occur in SoupMessage, SoupRequest and SoupSession objects, but none of the signals is named in such a straightforward way that it would make sense to use them for my needs. Are there signals that I have missed and already cover these events?
I've also though about creating a sort of benchmark structure that would measure time of domain lookup, connecting and requesting. Is there anything similar already available or in plans?
Thanks in advance,
Zan Dobersek
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]