GNOME Bugzilla – Bug 661455
Add some extra DNS prefetching
Last modified: 2018-08-03 19:32:24 UTC
One of the secrets behind Google Chrome's great network performance is that they do a very aggressive DNS prefetching. Whenever the user starts typing they begin to prefetch the closest matches in their URL database to speed up page load times. They even have a database with relationships between URLs so they can DNS prefetch URLs that are normally requested together. We can eventually do something similar but as a first step I implemented a DNS prefetch mechanism for the following two cases: * the EphyLocationEntry finds some matches for the text input by the user and shows them in a popup. In that case we can issue a DNS query for the X first results * the user types some text in the location entry that looks like a valid URL. In that case we can try to issue the DNS query before the user hits the enter key. I'll upload a patch with some data I got from testing.
Created attachment 198787 [details] [review] Add extra DNS prefetching to epy I performed the following test with and without this patch: 1- Start epy with web inspector 2- Type a URL or select it from the auto-completion popup 3- Write down the amount of time required by the first issued request to start downloading data I repeated this procedure for 5 times for each website. These are the average results. WEBSITE | no-prefetch | prefetch | difference (in %) --------------------|----------------|------------|--------------------- facebook.com 336 291 -13,19% www.adobe.com 384 227 -40,94% twitter.com 462 437 -5,40% www.baidu.com 1476 740 -49,89% login.live.com 409 383 -6,35% yahoo.com 643 467 -27,34% wikipedia.com 136 110 -18,63% flickr.com 463 328 -29,06% www.sina.com.cn 1450 360 -75,15% mail.ru 368 344 -6,34% craigslist.org 628 430 -31,60% Times are expressed in msecs NOTE: epy currently prefetches an auto-completion popup entry if the user selects it. I completely disabled it for the tests as this patch removes that use case.
Comment on attachment 198787 [details] [review] Add extra DNS prefetching to epy After talking a bit with Sergio today we decided this might be a good idea but that it's better to analyze this problem space globally and decide what do we want to do as a whole instead of keep adding dns prefetch bits independently.
Note: both we and Apple have disabled all of WebKit's prefetch features (there seem to be multiple). I tried to start a discussion on webkit-dev last week to ask why, but didn't get any feedback.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/epiphany/issues/149.