chore: use only one ts-node and improve perfomance by using swc for compilation#24255
Conversation
| "loader-utils": "2.0.0", | ||
| "memfs": "3.2.2", | ||
| "node-fetch": "2.6.7", | ||
| "nx": "13.10.6", |
There was a problem hiding this comment.
re-ordered during yarn add
| cwd: __dirname, | ||
| // https://github.com/TypeStrong/ts-node#skipproject - don't read tsconfig within ts-node | ||
| skipProject: true, | ||
| swc: true, |
There was a problem hiding this comment.
this makes execution 70 times faster :)
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ca290f1:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 05ef1df8bba19f528bd0e012e9c1d48017cbff91 (build) |
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1561 | 1537 | 5000 | |
| Button | mount | 1164 | 1181 | 5000 | |
| FluentProvider | mount | 1911 | 1878 | 5000 | |
| FluentProviderWithTheme | mount | 748 | 767 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 749 | 710 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 752 | 754 | 10 | |
| MakeStyles | mount | 2278 | 2298 | 50000 | |
| SpinButton | mount | 3156 | 3130 | 5000 |
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| BoxMinimalPerf.default | 294 | 278 | 1.06:1 |
| ImageMinimalPerf.default | 311 | 294 | 1.06:1 |
| ListWith60ListItems.default | 519 | 491 | 1.06:1 |
| PortalMinimalPerf.default | 150 | 142 | 1.06:1 |
| ListNestedPerf.default | 459 | 438 | 1.05:1 |
| SkeletonMinimalPerf.default | 288 | 275 | 1.05:1 |
| LabelMinimalPerf.default | 317 | 308 | 1.03:1 |
| RadioGroupMinimalPerf.default | 372 | 360 | 1.03:1 |
| RefMinimalPerf.default | 182 | 176 | 1.03:1 |
| SegmentMinimalPerf.default | 284 | 276 | 1.03:1 |
| TextMinimalPerf.default | 285 | 276 | 1.03:1 |
| AttachmentSlotsPerf.default | 930 | 911 | 1.02:1 |
| AvatarMinimalPerf.default | 157 | 154 | 1.02:1 |
| ButtonMinimalPerf.default | 134 | 131 | 1.02:1 |
| ButtonSlotsPerf.default | 448 | 438 | 1.02:1 |
| CarouselMinimalPerf.default | 388 | 382 | 1.02:1 |
| ChatWithPopoverPerf.default | 321 | 314 | 1.02:1 |
| CheckboxMinimalPerf.default | 2273 | 2232 | 1.02:1 |
| FlexMinimalPerf.default | 231 | 227 | 1.02:1 |
| MenuMinimalPerf.default | 717 | 706 | 1.02:1 |
| CustomToolbarPrototype.default | 2305 | 2267 | 1.02:1 |
| ToolbarMinimalPerf.default | 782 | 764 | 1.02:1 |
| TooltipMinimalPerf.default | 931 | 910 | 1.02:1 |
| AlertMinimalPerf.default | 223 | 221 | 1.01:1 |
| ButtonOverridesMissPerf.default | 1259 | 1245 | 1.01:1 |
| ChatMinimalPerf.default | 614 | 609 | 1.01:1 |
| DividerMinimalPerf.default | 289 | 287 | 1.01:1 |
| DropdownManyItemsPerf.default | 562 | 558 | 1.01:1 |
| DropdownMinimalPerf.default | 2647 | 2623 | 1.01:1 |
| HeaderMinimalPerf.default | 290 | 286 | 1.01:1 |
| InputMinimalPerf.default | 1083 | 1076 | 1.01:1 |
| ItemLayoutMinimalPerf.default | 988 | 976 | 1.01:1 |
| ListMinimalPerf.default | 430 | 425 | 1.01:1 |
| MenuButtonMinimalPerf.default | 1399 | 1389 | 1.01:1 |
| PopupMinimalPerf.default | 519 | 514 | 1.01:1 |
| ProviderMinimalPerf.default | 333 | 331 | 1.01:1 |
| StatusMinimalPerf.default | 558 | 553 | 1.01:1 |
| TextAreaMinimalPerf.default | 396 | 393 | 1.01:1 |
| TreeMinimalPerf.default | 679 | 673 | 1.01:1 |
| AnimationMinimalPerf.default | 441 | 442 | 1:1 |
| CardMinimalPerf.default | 444 | 443 | 1:1 |
| DialogMinimalPerf.default | 635 | 633 | 1:1 |
| GridMinimalPerf.default | 274 | 274 | 1:1 |
| HeaderSlotsPerf.default | 626 | 623 | 1:1 |
| ListCommonPerf.default | 518 | 520 | 1:1 |
| LoaderMinimalPerf.default | 564 | 563 | 1:1 |
| ProviderMergeThemesPerf.default | 1050 | 1048 | 1:1 |
| SliderMinimalPerf.default | 1401 | 1405 | 1:1 |
| SplitButtonMinimalPerf.default | 3640 | 3624 | 1:1 |
| TableManyItemsPerf.default | 1550 | 1551 | 1:1 |
| TreeWith60ListItems.default | 131 | 131 | 1:1 |
| VideoMinimalPerf.default | 513 | 515 | 1:1 |
| DatepickerMinimalPerf.default | 4754 | 4817 | 0.99:1 |
| EmbedMinimalPerf.default | 3409 | 3439 | 0.99:1 |
| LayoutMinimalPerf.default | 287 | 290 | 0.99:1 |
| RosterPerf.default | 919 | 925 | 0.99:1 |
| TableMinimalPerf.default | 329 | 336 | 0.98:1 |
| ChatDuplicateMessagesPerf.default | 233 | 239 | 0.97:1 |
| FormMinimalPerf.default | 315 | 324 | 0.97:1 |
| IconMinimalPerf.default | 469 | 482 | 0.97:1 |
| AccordionMinimalPerf.default | 117 | 122 | 0.96:1 |
| ReactionMinimalPerf.default | 290 | 305 | 0.95:1 |
| AttachmentMinimalPerf.default | 113 | 120 | 0.94:1 |
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| BaseButton | mount | 968 | 962 | 5000 | |
| Breadcrumb | mount | 2787 | 2771 | 1000 | |
| Checkbox | mount | 2701 | 2650 | 5000 | |
| CheckboxBase | mount | 2346 | 2310 | 5000 | |
| ChoiceGroup | mount | 4803 | 4835 | 5000 | |
| ComboBox | mount | 963 | 999 | 1000 | |
| CommandBar | mount | 10635 | 10647 | 1000 | |
| ContextualMenu | mount | 11846 | 11676 | 1000 | |
| DefaultButton | mount | 1171 | 1188 | 5000 | |
| DetailsRow | mount | 3941 | 3990 | 5000 | |
| DetailsRowFast | mount | 3869 | 3800 | 5000 | |
| DetailsRowNoStyles | mount | 3708 | 3670 | 5000 | |
| Dialog | mount | 2850 | 2898 | 1000 | |
| DocumentCardTitle | mount | 181 | 184 | 1000 | |
| Dropdown | mount | 3387 | 3414 | 5000 | |
| FocusTrapZone | mount | 1959 | 1920 | 5000 | |
| FocusZone | mount | 1886 | 1838 | 5000 | |
| IconButton | mount | 1823 | 1782 | 5000 | |
| Label | mount | 353 | 367 | 5000 | |
| Layer | mount | 3220 | 3222 | 5000 | |
| Link | mount | 509 | 493 | 5000 | |
| MenuButton | mount | 1564 | 1603 | 5000 | |
| MessageBar | mount | 2197 | 2195 | 5000 | |
| Nav | mount | 3421 | 3493 | 1000 | |
| OverflowSet | mount | 1160 | 1142 | 5000 | |
| Panel | mount | 2322 | 2253 | 1000 | |
| Persona | mount | 1081 | 1040 | 1000 | |
| Pivot | mount | 1541 | 1601 | 1000 | |
| PrimaryButton | mount | 1425 | 1370 | 5000 | |
| Rating | mount | 8032 | 8058 | 5000 | |
| SearchBox | mount | 1388 | 1396 | 5000 | |
| Shimmer | mount | 2586 | 2560 | 5000 | |
| Slider | mount | 2013 | 1996 | 5000 | |
| SpinButton | mount | 5190 | 5255 | 5000 | |
| Spinner | mount | 455 | 442 | 5000 | |
| SplitButton | mount | 3231 | 3270 | 5000 | |
| Stack | mount | 536 | 527 | 5000 | |
| StackWithIntrinsicChildren | mount | 2355 | 2431 | 5000 | |
| StackWithTextChildren | mount | 5388 | 5399 | 5000 | |
| SwatchColorPicker | mount | 12049 | 12081 | 5000 | |
| TagPicker | mount | 2797 | 2735 | 5000 | |
| TeachingBubble | mount | 94515 | 94948 | 5000 | |
| Text | mount | 444 | 471 | 5000 | |
| TextField | mount | 1411 | 1473 | 5000 | |
| ThemeProvider | mount | 1255 | 1258 | 5000 | |
| ThemeProvider | virtual-rerender | 701 | 685 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 1891 | 1887 | 5000 | |
| Toggle | mount | 837 | 814 | 5000 | |
| buttonNative | mount | 137 | 126 | 5000 |
swc for compilation
swc for compilationswc for compilation
| v8-compile-cache-lib "^3.0.1" | ||
| yn "3.1.1" | ||
|
|
||
| ts-node@~9.1.1: |
There was a problem hiding this comment.
we will dedupe once we migrate to nx 14
| "license": "MIT", | ||
| "scripts": { | ||
| "build": "ts-node --transpile-only ./src/build.ts", | ||
| "build": "ts-node --swc ./src/build.ts", |
|
can you check this pls @chrisdholt 🙌, |
Current Behavior
New Behavior
swcunder the hood (70x times faster)Related Issue(s)