core-vapor
                                
                                 core-vapor copied to clipboard
                                
                                    core-vapor copied to clipboard
                            
                            
                            
                        feat: destructuring + nesting in v-for
related #204
TODO
- [x] Achieve the expected functionality
- [ ] Test and support more edge cases
- [ ] Maintain good performance
Benchmark (WIP)
main hash: 1008199647224ba793b6c3a596483e1ed69df946
Benchmark mounting
in branch main runLots: min: 350.10 / max: 695.40 / median: 480.10ms / mean: 449.72ms / time: 487.30ms / std: 92.26 over 30 runs
in this PR runLots: min: 352.20 / max: 606.90 / median: 375.40ms / mean: 414.94ms / time: 366.80ms / std: 72.87 over 30 runs
Update every 10th row (10,000 rows)
in branch main update: min: 133.30 / max: 330.30 / median: 150.00ms / mean: 184.06ms / time: 306.80ms / std: 68.90 over 30 runs
in this PR update: min: 24.30 / max: 386.80 / median: 25.30ms / mean: 42.94ms / time: 24.90ms / std: 69.24 over 30 runs
Playground
Deploy Preview for vapor-template-explorer ready!
| Name | Link | 
|---|---|
| Latest commit | 572cf898470c9c8b77b0d3bf317f08c7097c50fa | 
| Latest deploy log | https://app.netlify.com/sites/vapor-template-explorer/deploys/6656c0ed324f9b000826ed3c | 
| Deploy Preview | https://deploy-preview-217--vapor-template-explorer.netlify.app | 
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. | 
To edit notification comments on pull requests, go to your Netlify site configuration.
Deploy Preview for vapor-repl ready!
| Name | Link | 
|---|---|
| Latest commit | 572cf898470c9c8b77b0d3bf317f08c7097c50fa | 
| Latest deploy log | https://app.netlify.com/sites/vapor-repl/deploys/6656c0ed7405f3000845cf1f | 
| Deploy Preview | https://deploy-preview-217--vapor-repl.netlify.app | 
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. | 
To edit notification comments on pull requests, go to your Netlify site configuration.
Size Report
Bundles
| File | Size | Gzip | Brotli | 
|---|---|---|---|
| compiler-dom.global.prod.js | 80 kB | 28.1 kB | 24.7 kB | 
| compiler-vapor.global.prod.js | 56.8 kB (-224 B) | 19.3 kB (-60 B) | 17.4 kB (-86 B) | 
| runtime-dom.global.prod.js | 94.9 kB | 35.8 kB | 32.3 kB | 
| runtime-vapor.global.prod.js | 48.2 kB (+306 B) | 18 kB (+95 B) | 16.4 kB (+106 B) | 
| vue-vapor.global.prod.js | 102 kB (+82 B) | 35.7 kB (+15 B) | 32.2 kB (+37 B) | 
| vue.global.prod.js | 152 kB | 55.1 kB | 49.2 kB | 
Usages
| Name | Size | Gzip | Brotli | 
|---|---|---|---|
| createApp | 55.3 kB | 21.2 kB | 19.4 kB | 
| createSSRApp | 58.6 kB | 22.5 kB | 20.5 kB | 
| defineCustomElement | 57.6 kB | 21.9 kB | 20 kB | 
| vapor | 48.5 kB (+306 B) | 18 kB (+111 B) | 16.5 kB (+98 B) | 
| overall | 69.1 kB | 26.2 kB | 23.8 kB | 
The current Playground in the Vapor project uses a list of shallowRef in bench/App.vue to measure the performance of v-for. When updating something, it directly refreshes the entire list with rows.value = rows.value.slice(). It seems like this is a kind of negative optimization when measuring projects like "Update every 10th row"?
playground/src/v-for.js:29:9 should be updated as well.