Commit b785256
perf(core): avoid intermediate arrays in definition (#61445)
A minor performance improvement for `ɵɵdefineComponent` where the underlying `extractDefListOrFactory` call had a chain of `.map.filter` which meant that we were unnecessarily creating intermediate arrays just to filter out the null values. These changes switch to simple `for` loop to get around it.
PR Close #614451 parent cf8c853 commit b785256
9 files changed
Lines changed: 21 additions & 35 deletions
File tree
- packages/core
- src/render3
- test/bundling
- animations-standalone
- defer
- forms_reactive
- forms_template_driven
- hydration
- router
- standalone_bootstrap
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
| |||
382 | 380 | | |
383 | 381 | | |
384 | 382 | | |
385 | | - | |
386 | | - | |
| 383 | + | |
| 384 | + | |
387 | 385 | | |
388 | 386 | | |
389 | 387 | | |
| |||
394 | 392 | | |
395 | 393 | | |
396 | 394 | | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | 395 | | |
402 | 396 | | |
403 | 397 | | |
| |||
657 | 651 | | |
658 | 652 | | |
659 | 653 | | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
| 654 | + | |
669 | 655 | | |
670 | | - | |
671 | | - | |
| 656 | + | |
| 657 | + | |
672 | 658 | | |
673 | 659 | | |
674 | 660 | | |
675 | 661 | | |
676 | | - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
677 | 665 | | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
682 | 675 | | |
683 | 676 | | |
684 | 677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
414 | 413 | | |
415 | 414 | | |
416 | 415 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
424 | 423 | | |
425 | 424 | | |
426 | 425 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
530 | | - | |
531 | 530 | | |
532 | 531 | | |
533 | 532 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
521 | 520 | | |
522 | 521 | | |
523 | 522 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
382 | 381 | | |
383 | 382 | | |
384 | 383 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
612 | 611 | | |
613 | 612 | | |
614 | 613 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | 319 | | |
321 | 320 | | |
322 | 321 | | |
| |||
0 commit comments