Discussion:
[Wt-interest] Slow response to second request
Rutger ter Borg
2016-11-02 16:29:51 UTC
Permalink
Hey all,

I've been trying to figure out why the initial load of my Wt app takes
relatively long. To test this, I'm running my Wt app through the Network
analyzer of Chrome, which gives a consistent long time-to-first-byte for
the second request of a (re)load. The second request is initiated by the
first page served by Wt, in my case this is the GET
/?wtd=igHEo7N800u7XfIE&request=style&page=1 HTTP/1.1
(it is usually followed by a third request with request=script). The
response to the second request (with request=style) is a one-liner:

@import url("/css/app.css");

but this takes longer than any other part of an (re)load to finish,
sometimes well over 100 ms (identical behaviour for wthttp and fcgi).
I've been looking in Wt's code, but I have only figured out that if the
WebSession does not have an app_ yet, so it somehow postpones the reply
(around line 1537 of WebSession.C).

Would it be possible to decrease this latency? If so, what are the
relevant parts of Wt to look into?

Thanks,

Rutger
Rutger ter Borg
2016-11-03 08:18:41 UTC
Permalink
Apparently the delay is caused by the parsing of the browser of the
initial page. So the html/js of the initial page would be the spot to
find a (probably minor) improvement.

Cheers,

Rutger
Post by Rutger ter Borg
Hey all,
I've been trying to figure out why the initial load of my Wt app takes
relatively long. To test this, I'm running my Wt app through the Network
analyzer of Chrome, which gives a consistent long time-to-first-byte for
the second request of a (re)load. The second request is initiated by the
first page served by Wt, in my case this is the GET
/?wtd=igHEo7N800u7XfIE&request=style&page=1 HTTP/1.1
(it is usually followed by a third request with request=script). The
@import url("/css/app.css");
but this takes longer than any other part of an (re)load to finish,
sometimes well over 100 ms (identical behaviour for wthttp and fcgi).
I've been looking in Wt's code, but I have only figured out that if the
WebSession does not have an app_ yet, so it somehow postpones the reply
(around line 1537 of WebSession.C).
Would it be possible to decrease this latency? If so, what are the
relevant parts of Wt to look into?
Thanks,
Rutger
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
Continue reading on narkive:
Loading...