Status: Unconfirmed
Owner: [email protected]
Labels: Type-Bug Pri-2 OS-All Area-Misc

New issue 6352 by [email protected]: Excessive HOSTS Access
http://code.google.com/p/chromium/issues/detail?id=6352

Chrome Version       : 2.0.156.1
URLs (if applicable) : *
Other browsers tested:
   Add OK or FAIL after other browsers where you have tested this issue:
      Safari 3:
     Firefox 3: OK
          IE 7: OK

What steps will reproduce the problem?
1. Open a new tab / Open a page / Click a link / Hover mouse / Almost
anything

What is the expected result?
Nothing.


What happens instead?
HOSTS file is thrashed (read for almost every action).


Please provide any additional information below. Attach a screenshot if
possible.
Chrome re-reads the HOSTS file for pretty much anything that occurs in the
browser. This isn’t a big deal if you only have one or two entries (ie
sizeof(HOSTS)<1KB), but for any large HOSTS files (eg ad-blocking, intra-
net, web-dev, etc.) this causes a MASSIVE performance hit for everything. I
finally understand why Chrome has been so slow, having 100% CPU usage, and
thrashing the disk recently.

I’ll admit that reading the HOSTS file for each query does allow changes to
take effect immediately instead of having to restart the browser, but that
is by no means worth the performance hit (and extra wear-and-tear) imposed,
especially since the HOSTS file is not modified often.

FireFox, IE, Opera, ping, tracert, etc. all read the HOSTS file as well,
but they don’t drag the system down nearly as much as recent version of
Chrome do (the initial versions didn’t seem to have a performance problem).

I believe that the HOSTS file is read by Windows itself when a web request
is made rather than by the application, so I suppose it would not be
possible to load one copy at startup and use that for the session. However
there is still something that is causing recent versions of Chrome to
access the file excessively.

The attached log file is a Filemon trace of access to the HOSTS file by
Chrome. It shows what happened when I simply ran Chrome, navigated to
Google.com (waited for it to load), navigated to Yahoo.com, then
Microsoft.com, created a new tab, navigated to Hotmail.com, closed the
first tab, navigated to Wikipedia.com, then closed the last tab (ie quit
Chrome). Nearly a quarter-million reads for those few browsings? Something
smells rotten in the state of Denmark!


Attachments:
        Chrome-HOSTS.zip  1.0 MB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to