Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable networking by default #1225

Open
bgrgicak opened this issue Apr 11, 2024 · 9 comments
Open

Enable networking by default #1225

bgrgicak opened this issue Apr 11, 2024 · 9 comments

Comments

@bgrgicak
Copy link
Collaborator

Having networking disabled by default is a performance improvement, but working networking is something most of us expect out of the box. I suggest that we enable networking by default and allow disabling it to improve user experience.

@adamziel @brandonpayton what do you think?

@adamziel
Copy link
Collaborator

adamziel commented Apr 11, 2024

I'd be more than happy to do that if it didn't add 5-10 seconds to loading /wp-admin and random screens. It makes the difference between "oh it's so fast" and "oh it's so slow" at the expense of an occasional "oh something isn't loading". Perhaps we could tactically block or pre-fetch specific api.wp.org requests though to make it faster.

@bgrgicak
Copy link
Collaborator Author

Perhaps we could tactically block or pre-fetch specific api.wp.org requests though to make it faster.

We will eventually need to preload "everything" if we want offline support (#1086). When we have that, it might be a good time to reconsider enabling networking by default.

@brandonpayton
Copy link
Member

@adamziel @bgrgicak, what does the performance cost of enabling networking come from?

@adamziel
Copy link
Collaborator

@brandonpayton /wp-admin won't render until all the network calls are finished, and requesting api.wp.org using fetch() is not as fast as native network implementation running on a server with a fast network connection.

@brandonpayton
Copy link
Member

@adamziel thanks, that helps! As a random thought, are there any api.wp.org requests that we could reasonably intercept and provide stub data for?

@adamziel
Copy link
Collaborator

adamziel commented Apr 11, 2024

I think we could pre-fetch or stub most of them! I'd only run "synchronously" the ones where it actually fetches a filtered list of patterns, plugins, themes.

@flexseth
Copy link
Collaborator

I think we could pre-fetch or stub most of them! I'd only run "synchronously" the ones where it actually fetches a filtered list of patterns, plugins, themes.

Speculative Loading - could be helpful to offset speed loss
https://make.wordpress.org/core/2024/04/09/speculative-loading-in-wordpress/

@adamziel
Copy link
Collaborator

With networking disabled, the file editor in wp-admin and other features based on the loopback request don't work:

Image

I'd love to get networking enabled by default sooner than later.

@ajitbohra
Copy link
Member

New people using Playground get the impression that it's a tool with limitations and meant to be used in a limited capacity. I have seen people struggle at meetups or when testing out for quick demos, and the plugin or theme install screen does not work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

5 participants