764 works perfectly when you're using normal slots, but not if you forward scoped slots to a child component.
Unfortunately, and I hope I'm mistaken about this, every component's entire VNode tree has to be iterated to find a component that needs refs updated.
Here's some perf testing of this PR in our application. In the Firefox profiler, afterRender shows up for:
0.5ms in a 1,000-node component
15ms in a 50,000-node component
Ideally this would use Vue's patch hooks like native Vue 2 refs do. Would it be out of the question to introduce a faster v-ref= instead of this PR? Or is this fast enough given that the readme already warns about performance issues?
764 works perfectly when you're using normal slots, but not if you forward scoped slots to a child component.
Unfortunately, and I hope I'm mistaken about this, every component's entire VNode tree has to be iterated to find a component that needs refs updated.
Here's some perf testing of this PR in our application. In the Firefox profiler,
afterRender
shows up for:Ideally this would use Vue's patch hooks like native Vue 2 refs do. Would it be out of the question to introduce a faster
v-ref=
instead of this PR? Or is this fast enough given that the readme already warns about performance issues?