Open volfkarlo opened 6 months ago
I think this will make a noticeable impact on block editor performance on sites with a large number of blocks, given all blocks are imported by default.
I also considered something like this for the frontend with the intersection observer API, but I'm not sure whether the overhead of observers plus network requests will make it a net positive impact.
We might take a look at lazy loading of the blocks inside the boilerplate. It might lower the initial load size and reduce the main thread execution time.
This is the idea:
Notice the default export at the end
Pontentially we can build up some kind of helper for solving this, something like:
But in a way that it works(this solution doesn't work).
What you are suppose to get is something like this inside the editor part
notice the additional file next to *Editor.js
@goranalkovic-infinum and I've tested it out, the savings for Grid block are measured in KBs but it might make a difference if everything is written in that way. I don't think this should be high on the priority list for testing, but potentially something to look into.
KR, Karlo