Open annezazu opened 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.
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.
This will probably be solved by #54999
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.