vuejs / core

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
https://vuejs.org/
MIT License
47.4k stars 8.3k forks source link

should render has a lazy update #12230

Closed TryChai closed 4 days ago

TryChai commented 4 days ago

Vue version

3.5.8

Link to minimal reproduction

no link

Steps to reproduce

The template data analysis update is too frequent. Can you add a lazy rendering to reduce the frequency of updates 4576bc3e91f6212b73f6af4c81631c9

What is expected?

From the position of the scroll bar, you can see that this function has been executed many times, which is the function inside the template, indicating that the template has been rendered many times. The rendering is too frequent. The granularity is too large. Every update updates the entire component

What is actually happening?

Excessive loss performance

System Info

No response

Any additional comments?

No response

skirtles-code commented 4 days ago

Rendering updates are already batched using a microtask, so making multiple changes to the data should only trigger a single re-render. Without a reproduction it isn't really possible to tell what you're doing or what kind of lazy rendering you would need to fix it.

edison1105 commented 4 days ago

please follow the issues requirement provide a minimal reproduction.