test: add stress-test for blocks performance #10340
Open
+614
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Adds a Pages collection to the _community test. The Pages collection has 50 blocks with 25 container blocks that can each contain the 50 standard blocks.
Why?
Projects with many blocks (especially the nesting with container blocks) lead to agonizingly slow admin navigation. I started a discussion to see if these can get cached in a similar fashion to the lexical features that greatly improved frontend navigation when using richText fields.
I'm currently using 35 blocks with 9 container blocks in a real-world project. It's in production with Payload v2. The large number of blocks leads to 15-30min HMR and build times in v2. In v3, HMR and build is much faster, but admin navigation is unusable.
How?
By generating 50 blocks and 25 container blocks that are used in a new Pages collection. Navigation in the admin dashboard grinds to a near halt.