Expand my Community achievements bar.

SOLVED

Number of components exceeded on a particular page

Avatar

Level 1

Hi,

 

I'm getting below warning, any thoughts on how to remove unwanted components or increase the count of components on a particular page?

Screenshot 2024-01-31 at 4.53.38 PM.png 

 

 

 

Thanks,

Inderjeet Singh Ahuja

FYI:- @sunil_kumar_  @SantoshSai  @Kiran_Vedantam  @Aditya_Chabuku @Fanindra_Surat 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@IS_Ahuja What is the rationale of having such a high number of component instances?

You might want to look at the components that are being used on this page and see if there are any common areas in the DOM layout that can be combined to create a composite component so that instead creating very granular components, these are created as logical units based on the DOM content.

Your lighthouse report will be screaming right now due to excessive number of DOM elements. If that is the case, you also might want to speak with your content authors to come up content strategy to minimize such a high number of components on a single page by minimizing the overall content on a single page.

 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@IS_Ahuja What is the rationale of having such a high number of component instances?

You might want to look at the components that are being used on this page and see if there are any common areas in the DOM layout that can be combined to create a composite component so that instead creating very granular components, these are created as logical units based on the DOM content.

Your lighthouse report will be screaming right now due to excessive number of DOM elements. If that is the case, you also might want to speak with your content authors to come up content strategy to minimize such a high number of components on a single page by minimizing the overall content on a single page.

 

Avatar

Community Advisor

The error message itself says there are 206 components on the page, as threshold is 100 only so may be other developer might also have seen this error message.
Authoring 206 components on a page is tough for a developer so there is a possibility that max of the components are pre-authored from template so check the template's structure if there are unwanted component, just remove it to save from future occurrence the issue and for now you can remove the component by selecting it from the page. If you are not able to select the component from the page, take help from component tree in the page editor.

Hope this helps

Umesh Thakur