WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.46k stars 4.18k forks source link

Performance: Review pattern performance (at scale, various inserters, etc) #54704

Open annezazu opened 1 year ago

annezazu commented 1 year ago

Pulled from this prior issue https://github.com/WordPress/gutenberg/issues/27890, I wanted to surface this as a task for @WordPress/performance / @oandregal to consider partially too as a follow up to this recent performance problem and fix https://github.com/WordPress/gutenberg/issues/50695

Patterns continue to play an important role in the future of WordPress so let's ensure they are performant at scale! This includes using lots of them and in exploring how performant they are across different Inserters.

glendaviesnz commented 1 year ago

This has hopefully been resolved by https://github.com/WordPress/gutenberg/pull/54007 which added paging to the pattern list pages client side in the post editor inserter. I think the issue was mostly client-side with the browser struggling to render so many patterns, rather than a server response time issue, but it would be worth testing and clarifying this so we can decide if we also want to page the server responses.

mslinnea commented 1 year ago

I created 5000 synced patterns that were all very simple (each pattern just a couple of paragraphs), and I didn't run into the browser crashing or any noticeable issue, so I'd agree it likely relates to the browser trying to render so many patterns. The pagination in https://github.com/WordPress/gutenberg/pull/54007 sounds promising.

draganescu commented 12 months ago

This will probably be solved by #54999