middleman/middleman-livereload

Slow server response time when livereload is activated

slipperydippery opened this issue · 5 comments

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

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.

Try changing the host option to 127.0.0.1

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. )

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?

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)