bdkjones / CodeKit2

CodeKit 2 Beta
97 stars 4 forks source link

Disable "Connecting to CodeKit's refresh server" Bar #516

Open sethta opened 9 years ago

sethta commented 9 years ago

Recently, I've been having a lot of issues with the orange bar appear stating that my connection to CodeKit is unstable. I'm not sure if this is because I finally made the switch to Yosemite or not, but it's been a little annoying and I've dealt with it.

With the latest update, I now have a different orange bar appear that says "Connecting to CodeKit's refresh server... (Auto-refreshing will not work until this completes.)" There is no way to hide this bar or disable it. I just have to wait for the connection to be made. Unfortunately, with the recent unstableness and this connection, it is slowing down development. If I need to switch pages, and the navigation is at the top, I sometimes have to wait a full 30 seconds just to click the link as I wait for the orange bar to disappear.

I understand that I won't always have a perfect connection, but please give the option to disable these messages so I can keep my development process quicker. I'm fine hitting the refresh button if an auto-reload doesn't immediately happen, so I'm ok if I don't see the notice.

bdkjones commented 9 years ago

Try using the non-bonjour preview address from the server popover. Let me know if the laggy connection persists. If it does not, Bonjour name resolution is taking inordinately long on your network for some reason.

sethta commented 9 years ago

I tried the switch and am still receiving an issue. Not sure if it's due to OSX, Vagrant or router.

I have a Late 2013 rMBP 15" with OSX 10.10.1.

I use VVV for my dev server with almost 100 sites on it, but seeing how I only run 1 site at a time, there shouldn't be any server load. It's been happening on all of my sites from highly dynamic WordPress sites, to a couple static HTML sites.

My router is a Netgear Nighthawk R7000 router, and I have no problems transferring files over wireless as its AC, and the connection is comparable to LAN. I do have a thunderbolt dock coming in the mail today, so I'll be able to test that later and see if it's a wireless issue.

sethta commented 9 years ago

Ok, it appears my issue is with VVV. I just visited the dev site without a CodeKit address, and am still having everything load quite slow. I'll work on trying to get that fixed.

sethta commented 9 years ago

So I've been doing a lot and have narrowed it down to something in my theme when in conjunction with Vagrant, which is good for you and not so good for me. ;)

As for this issue, I still think it would be beneficial to have an option to turn off the orange bar, or an option to allow someone to click on it to dismiss it, but that's your call on if you think it will help more than just me. Thanks for the great software!

bdkjones commented 9 years ago

This is actually pretty helpful. Can you narrow down what, exactly, is causing the issue with Vagrant?

On 4 Feb 2015, at 21:10, Seth Alling notifications@github.com wrote:

So I've been doing a lot and have narrowed it down to something in my theme when in conjunction with Vagrant, which is good for you and not so good for me. ;)

As for this issue, I still think it would be beneficial to have an option to turn off the orange bar, or an option to allow someone to click on it to dismiss it, but that's your call on if you think it will help more than just me. Thanks for the great software!

— Reply to this email directly or view it on GitHub https://github.com/bdkjones/CodeKit/issues/516#issuecomment-72995317.

sethta commented 9 years ago

So, I've been working heavily on 3 different projects, and was only testing them. I figured if all 3 were slow then it was an issue with Vagrant. Finally, I switched to the Twenty Fifteen theme and the speed was at least moderate. I then tried a different project from a few weeks ago, and that also had decent speed.

All three of my current projects required heavy use of the Advanced Custom Fields plugin, specifically using the oEmbed field within a repeater. Running through the standard procedure of getting values within a repeater takes entirely too long when it's trying to create an embed, especially if I'm not embedding anything but then parsing that data to just pull the URL (I like the interface the oEmbed gives in the admin section). By simply pulling all of the repeater information into a single array, and then looping through it, I was able to pull everything I needed, and it's back to moderate speeds again (3-4 seconds per page load instead of 20-30 seconds).

On my server online, there wasn't much of a delay, but as one of these projects will be going on shared hosting, it's probably for the best that I figured all of this out.

Next, I did all of the following to speed up vagrant:

Doing all of this has put me down to 1-2 seconds for a front-end page load. Hopefully all of this helps someone else if they ever run into a similar issue.

sethta commented 9 years ago

And finally, now that I have set the calls of those single arrays into transient variables for WordPress, I'm back under a half a second load for a page. Codekit runs flawlessly once again!

So, I don't need an option to disable the orange bar anymore, but it is possible that you may have someone else request it if they run into an issue where their internal server gets bogged down. It's your decision on if you think it will be worth it or not.

dimamarkus commented 9 years ago

Previewing a page on a real phone browser is a huge amount of value added even if it is not auto-refreshing. Is there any way you can add a close button to this bar? I suppose it doesn't hurt too much if it comes up every time the page is reloaded, but it makes it impossible to preview the whole page when you don't care about the reloading.

bdkjones commented 9 years ago

Yep. I’m working on it.

On 15 Mar 2015, at 18:42, Dima Markus notifications@github.com wrote:

Previewing a page on a real phone browser is a huge amount of value added even if it is not auto-refreshing. Is there any way you can add a close button to this bar? I suppose it doesn't hurt too much if it comes up every time the page is reloaded, but it makes it impossible to preview the whole page when you don't care about the reloading.

— Reply to this email directly or view it on GitHub https://github.com/bdkjones/CodeKit/issues/516#issuecomment-81339454.

NoahDavidATL commented 9 years ago

I would also like an option button to disable that orange bar...

xetryj commented 8 years ago

Check your HostName - I had the same issue;

sudo scutil --get HostName If you don't get back an expected result (ie. lukas.local) change it... along with the ComputerName and LocalHostName if they need changing...

sudo scutil --set ComputerName Lukas sudo scutil --set LocalHostName lukas sudo scutil --set HostName lukas.local Restart the CodeKit servers.

Hope that helps someone at least.