Lightning/Aura Components: Too many components for aura

Is there any limit on a number of rendered components on a single page\within a single Lightning App? Here is an error message that occurs sometimes when many records are rendered in a Lightning App:

“Too many components for aura://ComponentController.getComponent(…)”

So is it a built-in limit on an Aura/Lightning App component instances number? Or is it the framework failing to handle the number of elements of a single component type?

Answer

Per app/cmp there is a 10,000 inner component limit. This number is chosen and enforced by the framework. Source code here.

This was introduced to prevent infinite loop situations where a component included itself in markup repeatedly. It’s also an attempt to prevent scenarios that would be detrimental to performance for the app, such as a large number nested loops creating the same or similar component.

Attribution
Source : Link , Question Author : agnitsevich , Answer Author : TrevorBliss

Leave a Comment