question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Initial load and CSS Injections are extremely slow with Local/Pressmatic

See original GitHub issue

I’m using browserSync with Local by Flywheel - and it’s just killing the loading time.

My config (gulp in CoffeeScript):

	sync.init "build/directory/path/*.css",
		proxy:
			target: devsite.dev
		open: false
		port: 3002

It has something to do with the IP probably, because Local is creating it’s own IP, and to use BS I have to connect to localhost:3002, not devsite.dev - but I can’t figure out a way to make it work at the moment.

I just upgraded to browser-sync@2.18.8 - still same issue

Edit:

Tried a radical attempt to fix this - still doesn’t work.

Config:

gulp.task "browser-sync", ->
	sync.init "#{Config.build}/*.css",
		proxy:
			target: Config.url
		open: false
		port: 3002
		logConnections: true
		logLevel: 'debug'
		online: false
		https: false

BrowserSync Debug:

[10:35:04] Starting 'browser-sync'...
[BS] [debug] -> Starting Step: Finding an empty port
[10:35:04] Finished 'browser-sync' after 24 ms
[10:35:04] Starting 'sync'...
[BS] [debug] Found a free port: 3002
[BS] [debug] Setting Option: port - 3002
[BS] [debug] +  Step Complete: Finding an empty port
[BS] [debug] -> Starting Step: Getting an extra port for Proxy
[BS] [debug] +  Step Complete: Getting an extra port for Proxy
[BS] [debug] -> Starting Step: Checking online status
[BS] [debug] +  Step Complete: Checking online status
[BS] [debug] -> Starting Step: Resolve user plugins from options
[BS] [debug] +  Step Complete: Resolve user plugins from options
[BS] [debug] -> Starting Step: Set Urls and other options that rely on port/online status
[BS] [debug] Setting multiple Options
[BS] [debug] +  Step Complete: Set Urls and other options that rely on port/online status
[BS] [debug] -> Starting Step: Setting Internal Events
[BS] [debug] +  Step Complete: Setting Internal Events
[BS] [debug] -> Starting Step: Setting file watchers
[BS] [debug] +  Step Complete: Setting file watchers
[BS] [debug] -> Starting Step: Merging middlewares from core + plugins
[BS] [debug] Setting Option: middleware - List []
[BS] [debug] +  Step Complete: Merging middlewares from core + plugins
[BS] [debug] -> Starting Step: Starting the Server
[BS] [debug] Proxy running, proxing: http://melon.dev:80
[BS] [debug] Running mode: PROXY
[BS] [debug] +  Step Complete: Starting the Server
[BS] [debug] -> Starting Step: Starting the HTTPS Tunnel
[BS] [debug] +  Step Complete: Starting the HTTPS Tunnel
[BS] [debug] -> Starting Step: Starting the web-socket server
[BS] [debug] Setting Option: clientEvents - List [ "scroll", "scroll:element", "input:text", "input:toggles", "form:submit", "form:reset", "click" ]
[BS] [debug] +  Step Complete: Starting the web-socket server
[BS] [debug] -> Starting Step: Starting the UI
[BS] [debug] Setting Option: session - 1490600104252
[BS] [UI] Starting Step: Setting default plugins
[BS] [UI] Step Complete: Setting default plugins
[BS] [UI] Starting Step: Finding a free port
[BS] [UI] Step Complete: Finding a free port
[BS] [UI] Starting Step: Setting options also relevant to UI from BS
[BS] [UI] Step Complete: Setting options also relevant to UI from BS
[BS] [UI] Starting Step: Setting available URLS for UI
[BS] [debug] Getting option via path: urls
[BS] [UI] Step Complete: Setting available URLS for UI
[BS] [UI] Starting Step: Starting the Control Panel Server
[BS] [UI] Using port 3001
[BS] [UI] Step Complete: Starting the Control Panel Server
[BS] [UI] Starting Step: Add element events
[BS] [UI] Step Complete: Add element events
[BS] [UI] Starting Step: Registering default plugins
[BS] [debug] Getting option via path: urls,external
[BS] [debug] Getting option via path: urls,local
[BS] [UI] Step Complete: Registering default plugins
[BS] [UI] Starting Step: Add options setting event
[BS] [UI] Step Complete: Add options setting event
[BS] [debug] +  Step Complete: Starting the UI
[BS] [debug] -> Starting Step: Merge UI settings
[BS] [debug] Setting Option: urls - Map { "local": "http://localhost:3002", "ui": "http://localhost:3001" }
[BS] [debug] +  Step Complete: Merge UI settings
[BS] [debug] -> Starting Step: Init user plugins
[BS] [debug] Setting Option: userPlugins -
[BS] [debug] +  Step Complete: Init user plugins
[BS] Proxying: http://melon.dev:80
[BS] Access URLs:
 ----------------------------
 Local: http://localhost:3002
 ----------------------------
    UI: http://localhost:3001
 ----------------------------
[BS] Watching files...
[BS] Browser Connected: Chrome, version: 59.0.3051.3
[BS] Browser Connected: Chrome, version: 59.0.3051.3

OS X Sierra, Latest BrowserSync, Local by Flywheel 1.4.2 with Virtualbox

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:11

github_iconTop GitHub Comments

12reactions
sethsthacommented, Jun 5, 2020

I have another solution. If you enable IPv6 Lookup from preference -> advanced, It resolves the problem.

3reactions
akkoladcommented, Feb 22, 2018

@jobsturm Go on the menu of the top bar of your screen “Local by Flywheel” > preferences > advanced > enable IPv6 , or the same with the shortcut “⌘,”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixing a slow site iteratively - CSS-Tricks
I'm going to update my referenced URL to the new site to help decrease latency that adds drag to the initial page load....
Read more >
Optimizing CSS for faster page loads - Tomas Pustelnik
To see how CSS affects the load time of a webpage we first have to know how the browser converts an HTML document...
Read more >
5 Common Mistakes Developers Do that Affect Page Load Time
Conversion — The faster your page loads, the more engagement you will have from the user. Slow sites, kill conversions. Users will be...
Read more >
How to speed up loading time on initial load in Angular 7?
1 Answer 1 · i tried gzip and i compressed all file. · you can just gzip all of the files, so basically...
Read more >
Stealing private data with a CSS injection | Invicti
In theory, this should work well, but it's easy to circumvent in practice and there is also no client-side protection from stored XSS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found