The problem of quantity and performance of vue components

imagine having two components
componentA, componentB

componentA is a ul , and
componentB is called li

.

< componentB vsway for = "i in list" / >
(while this list is an array of more than 100)
v-for the same number of componentB,

is there a big god who knows that there are any doubts about the performance of a large number of generated components such as v vendor ue? Maybe it"s better not to break it up into widgets?
wants to know how vue handles this, and whether a large number of vue nodes will be generated at compile time (is that so?) , causing performance to slow down?

Mar.12,2021

take a look at the lifecycle of Vue. In fact, all components mount Mount , render, and generate virtual DOM nodes. The compilation of components and the transfer of data between components naturally take time, so the functions that can be implemented in a component should not be separated as far as possible.


1. First of all, the purpose of encapsulating the component is to reuse and improve the maintainability of the code. If you have simple code in your li, there is no need to encapsulate it. If the logic is more complex, it can be encapsulated into a component
2. Second, the efficiency will certainly decrease after it is encapsulated into a component, but it will only go through the complete life cycle when it is loaded for the first time, and the impact on efficiency will be ignored if later updates are made
3. Third, if you have 100 or more li, do you want to consider paging loading? it is impossible to load so many

at one time.
Menu