At what point does the number of collections affect performance? #11347
Replies: 1 comment
-
Admin Panel PerformanceThere are three main areas that can slow down the Payload Admin Panel as your config grows larger:
We’re actively optimizing performance to ensure Payload scales well, even with large configurations. Blocks specificallyWe've shipped Block References just a few days ago to significantly improve performance when you have many blocks. Here's a performance comparison. This feature allows you to define each block only once. Then, whenever you use that block, it doesn’t add any additional overhead for calculating permissions, sending client config, or generating types. You could use the same block in 300 different places, and performance would remain comparable to using it in just one collection - even if you accumulate thousands of referenced blocks. Admin Panel performance might slow down if you have a lot of collections, globals, or fields that sit outside of your blocks. However, you would need a very large number of them to notice a significant slowdown, and we continue to make improvements in this area. It also depends on the speed of your CPU, so it's hard to say when specifically you notice a slowdown. API PerformanceThe amount of collections / globals should barely affect the performance of the payload API, if at all. The amount of fields in the specific collection that is being queried will affect API performance, as we're deeply iterating fields to handle things like validation / access control / populating relationships. |
Beta Was this translation helpful? Give feedback.
-
I have a project with many blocks. Since these should be reusable, this could lead to about 300 collections.
I am currently evaluating CMSs and was wondering if performance would start to choke as the number of collections increases.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions