Open bgrgicak opened 5 months ago
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.
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.
@adamziel @bgrgicak, what does the performance cost of enabling networking come from?
@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.
@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?
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.
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/
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?