Open corentin-gautier opened 1 year ago
Probably related to #36716.
cc'ing @youknowriad @tyxla and @jsnajdr , in case this issue can be related to existing issues (or is a duplicate of an existing one)
This has always been a constant preoccupation for all of us. We did several iterations and improvements over time but features come with a cost. So this is more like an on-going thing. There's no solution to this issue but it's something that all developers should keep in mind.
For the next iterations, There are a few things we can try:
Lodash has been removed, see #17025 and #52571.
Also, there's an experiment running to stop loading TinyMCE when possible, see #50387.
Also, there's an experiment running to stop loading TinyMCE when possible, see #50387.
We could explore having a similar mechanism for loading scripts handling meta boxes only when they are required for the post editor. As of today, we always enqueue postbox
script handle:
More in https://github.com/WordPress/gutenberg/issues/32665.
What problem does this address?
Currently, opening the editor (with just Twenty Twenty Three, no plugins) loads about 1.3 mB of javascript, which is a lot, with multiple files being over 100 kB in size. I'm wondering why so much javascript is loaded and if there's room for improvements here.
(comparatively, the list of posts has 88 kB of javascript)
https://user-images.githubusercontent.com/4660731/215814345-a122f26b-3a51-4187-b7f1-484a81c12ae9.mov
Here's a list of the scripts and their sizes
What is your proposed solution?
I think auditing all those scripts, looking for redundancy and maybe lazyloading scripts that are not needed immediately could improve loading and rendering performances quite a lot