Comment #46 on issue 7823 by [email protected]: Closing tabs takes too long (even when not swapped out) http://code.google.com/p/chromium/issues/detail?id=7823
hmm, I finally tracked down some of the script on the gigaom site. There were _four_almost identical scripts loaded from an ad network (collective media): http://a.collective- media.net/cmadj/idgt.gigaom/article_above;dcopt=ist;tile=1;fold=above;sec=article;sz=728x90;ord=3646901959876937;ord1=777857;cmpg url=http%253A//gigaom.com/2009/08/12/dvorak-raises-doubts-about-us-cio-vivek-kundra/? http://a.collective- media.net/cmadj/idgt.gigaom/article_below;tile=2;fold=below;sec=article;sz=300x250;ord=3646901959876937;ord1=432302;cmpgurl=http% 253A//gigaom.com/2009/08/12/dvorak-raises-doubts-about-us-cio-vivek-kundra/? http://a.collective- media.net/cmadj/idgt.gigaom/article_below;tile=3;fold=below;sec=article;sz=300x250;ord=3646901959876937;ord1=671448;cmpgurl=http% 253A//gigaom.com/2009/08/12/dvorak-raises-doubts-about-us-cio-vivek-kundra/? http://a.collective- media.net/cmadj/idgt.gigaom/article_below;tile=4;fold=below;sec=article;sz=160x600;ord=3646901959876937;ord1=345454;cmpgurl=http% 253A//gigaom.com/2009/08/12/dvorak-raises-doubts-about-us-cio-vivek-kundra/? Each script calls the following code for onbeforeunload and onunload: if (j._to != null) { window.clearInterval(j._to); j._to = null } j._vt_0(); j._it_0(); j._log("U"); j.done = true; var b = new Date(); var c = 0; while (c < 200) { var d = new Date(); var c = d.getTime() - b.getTime() } which is a nice 200ms wait. This accounts for 1.6 seconds of waiting. Before doing this, each script also (asynchronously) fetches a tracking image, which can be seen from the IPC log. By adding so many handlers, the page is able to evade a browser's hung js detector, but still wait for their tracking to finish before leaving the page. This is pretty bad. Reminds me of Darin's long ago effort to introduce an html tag to visit asynchronously when navigating away from a page. Not sure of what we can do as a browser to stop the abuse of these handlers, while allowing legitimate use cases like letting a page save work. -- 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 -~----------~----~----~----~------~----~------~--~---
