middleman / middleman-livereload

LiveReload support for Middleman
http://middlemanapp.com
MIT License
117 stars 37 forks source link

Slow server response time when livereload is activated #60

Open slipperydippery opened 10 years ago

slipperydippery commented 10 years ago

Hi,

I'm sorry in advance if I'm doing something completely wrong.

I'm having an issue with middleman-livereload. Whenever I have livereload activated, I'm getting slow server response times. Below is a screenshot of Chrome Dev Tools Network Panel after a manual refresh of a new Middleman project. There's no custom template - the only thing I changed was un-commenting livereload in config.rb.

https://imgur.com/ZUbwwNH

It's an issue that only arises when I have livereload active.

I'm happy to supply you with more info if necessary.

Middleman version: 3.3.3 Middleman-livereload: 3.1.0 Windows 7 tested on Chrome: 36.0.1985.32 beta-m and on Firefox

Thanks in advance

Zequez commented 9 years ago

Same issue in Windows. Tried changing webrick DoNotReverseLookup but it didn't work. Looking for solutions.

Edit: The issue seems to be with rack-livereload. Couldn't solve it yet though. A workaround is to go over to /lib/middleman-reload/extension_3_1.rb and comment out the line use ::Rack::LiveReload. Then use a browser extension to handle Livereload. The downside is that you cannot set the port.

Arcovion commented 9 years ago

Try changing the host option to 127.0.0.1

shinnkondo commented 9 years ago

Thanks Zequez, your solution works for me.(and changing host option did not work.)

Unfortunately, judging from the response to this issue posted by Zequez to rack/livereload, waiting for rack/livereload to fix this problem would not be a good idea.

Is it possible for middleman-livereload to permit an option not to use ::Rack::LiveReload?

I think it makes sense to allow people to use addon/extension for livereload instead of embed js. I guess good number of Windows users and someone who do not want their html files modified would appreciate such an option.

(and Yes, I do not want to comment out the line every time this is updated. )

tdreyno commented 9 years ago

I was under the impression that the browser extension had been removed in favor of this approach?

Livereload has always been a black box, are there docs on the protocol now?

sandstrom commented 7 years ago

I'm doing some issue-gardening 🌿🌷🌾 and came across this issue.

Sorry that this has lingered for quite a while! I'd suggest either closing this issue or submitting a PR with an implementation or at least a failing test.

(this repo is maintained by a few people contributing their free time, unfortunately we can't solve every issue on our own, so help from others is needed for some of the more exotic issues that crops up)