Browser Sync is too slow when Chrome Dev Tools window is open
This issue was first reported on Polymer project and I am moving it here as suggested by @ebidel.
How to regenerate the problem:
yo polymer
gulp serve
- Open Chrome Dev Tools
- Edit anything to trigger Browser-Sync
- It takes around 15 seconds for the browser to sync throwing this log:
Resource interpreted as Document but transferred with MIME type text/css: "http://localhost:3000/bower_components/paper-drawer-panel/paper-drawer-panel.css". localhost/:61 Resource interpreted as Document but transferred with MIME type text/css: "http://localhost:3000/bower_components/paper-item/paper-item-shared.css". localhost/:61 Resource interpreted as Document but transferred with MIME type text/css: "http://localhost:3000/bower_components/paper-menu/paper-menu-shared.css".
The problem does not occur in Firefox.
This issue was not there before August 1st. It is either due to Polymer update or Chrome update (if there was any update from August 1st to 21st on Chrome Beta channel).
Using windows 10, don't remember Chrome version back then but it is still present on Chrome 46.0.2490.33 beta-m. I went through a lot of trouble to get Polymer working especially fixing socket.io issues.
cc @paulirish
What is browsersync doing during that time?
@baazoo What version of the Polymer generator for Yeoman you are using? (this lets us know what version of PSK this is being experienced with).
I'm unable to reproduce this on Mac/Chrome 46-47, but will test on Windows 10. cc @shakyShane in case there was a regression in BrowserSync we might have missed.
I had forgotten to turn off network throttling. Sorry for the false report!
😊👍
hah. no worries. filed this as a result.... https://code.google.com/p/chromium/issues/detail?id=535050 DevTools: Network throttling only lasts for current devtools session.
how does that sound?
@paulirish I've run into quite a few occasions where I forgot it was still on and was surprised at how slow things had become. Making it session-aware makes a lot of sense imo.
@paulirish oh please yes. The easier access is nice, but far too easy to forget :)