Problem/Motivation
Layout builder has the class BlockComponentRenderArray which is called indirectly via the event dispatcher to generate a render array for a block.
This method directly calls $block_plugin->build() which generates a render array.
However, block module's block entity BlockViewBuilder builds a render array using #lazy_builder for all blocks.
This means that when you use the block system to render blocks, they will automatically be renderable via bigpipe and dynamic page cache, but when you use layout builder, they won't.
Steps to reproduce
Proposed resolution
It looks to me like conversion to a lazy_builder wouldn't be too bad.
The things passed to the event that are needed are the block plugin, which we can get the plugin ID from, the layout_builder.entity, which we can get the entity ID from, inPreview() which is a bool, and $event->getComponent()->getWeight() which will be an int.
We can then pass the block plugin ID and the layout builder entity ID, the in_preview bool and the weight int to the lazy_builder callback, get the plugin and load the layout builder entity, then do all the same logic as is currently done directly.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet