-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Render time of list of components increases in dev mode after each render #5174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, thanks for filling this issue. |
That's fair. I'll clarify, then: the rendering speed should be consistent between renders, fast or slow, but it's taking more and more time each time the list of elements are being rendered. This leads me to believe there's some sort of memory leak somewhere, where extra function calls are being done on data that should have been GC'd already. |
Creating 1000 stateful components is obviously slower than creating 1000 spans. Also make sure to use the minified version when benchmarking, please |
That's not the issue.
Check the "use component" box, and toggle the components about a dozen times to get a good idea of what I'm talking about here. The rendering of the components gets progressively slower each time. And I mentioned that this doesn't happen with the production build, but the possibility of a memory leak of some kind is what pushed me to report this. |
Ok, sorry for that, the title is so misleading. There's indeed a strange increase of render time that only happens on dev mode. I checked and there's no memory leak. |
It's difficult issue to find and describe, so no worries. |
This seems to be caused by calls to |
* 'dev' of https://github.com/vuejs/vue: (118 commits) [weex] Support unary and left open tags (vuejs#5052) [release] 2.2.4 [build] 2.2.4 fix perf measure regression for nested components of the same name (fix vuejs#5181) [release] 2.2.3 [build] 2.2.3 perf code coverage improve camelCase prop warning message warn when template contains text outside root element (vuejs#5164) Warn when not passing props in kebab-case (vuejs#5161) turn off perf timeline measuring by default + reduce its impact on dev time perf (fix vuejs#5174) v-bind object should have lower priority than explicit bindings (fix vuejs#5150) fix custom directive arg fall through (fix vuejs#5162) formatting tweaks refactor create-component fix wrong order of generate modifier code (vuejs#5147) fix v-on unit test (vuejs#5144) fix vuejs#5121: parse content in textarea as plaintext (vuejs#5143) [release] 2.2.2 [build] 2.2.2 ... # Conflicts: # dist/vue.runtime.common.js # src/core/vdom/helpers/update-listeners.js
Uh oh!
There was an error while loading. Please reload this page.
Vue.js version
2.2.2
Reproduction Link
https://jsfiddle.net/Kingdaro/1jpsbjz9/
Steps to reproduce
Toggle the list of elements on and off.
What is Expected?
Consistent speed between component list re-renders.
What is actually happening?
With "use component" unchecked: rendering is instantaneous.
With "use component" checked: rendering the components takes longer and longer each time the elements are rendered.
Tested in Firefox, Edge, Chrome and Opera. It seems to be most noticeable with Chrome and Opera.
This does not appear to happen in production mode, but cases like this during testing will mean eventually waiting full seconds for many components to render.
The text was updated successfully, but these errors were encountered: