Skip to content
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

feat(scripts-tasks): implement ~36% faster type-check task #31116

Merged

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Apr 19, 2024

Previous Behavior

New Behavior

TS build mode is significantly more expensive and makes sense only with composite projects ( reference linking across whole monorepo ).

This PR changes implementation to use simple tsc -p against all referenced projects within project root TS solution config. As a nice benefit we don't have to override tsconfigs in order to turn off path aliases as that is being handeld by --baseUrl CLI override on callsite.

@fluentui/react-migration-v8-v9 type-check

Command Time Delta
tsc -b (current) 5s BASE
tsc -p N (parallel execution - avoiding build mode) 3.2s 𝚫 -36%

Related Issue(s)

Copy link

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.

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react-components)

Scenario Render type Master Ticks PR Ticks Iterations Status
FluentProviderWithTheme virtual-rerender 34 36 10 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 629 647 5000
Button mount 299 310 5000
Field mount 1102 1113 5000
FluentProvider mount 721 700 5000
FluentProviderWithTheme mount 82 81 10
FluentProviderWithTheme virtual-rerender 34 36 10 Possible regression
FluentProviderWithTheme virtual-rerender-with-unmount 83 76 10
MakeStyles mount 842 880 50000
Persona mount 1789 1712 5000
SpinButton mount 1393 1434 5000
SwatchPicker mount 1505 1534 5000

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react-northstar)

⚠️ 2 potential perf regressions detected

Potential regressions comparing to master

Scenario Current PR Ticks Baseline Ticks Ratio Regression Analysis
LayoutMinimalPerf.default 209 205 1.02:1 analysis
AlertMinimalPerf.default 162 171 0.95:1 analysis
Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
AccordionMinimalPerf.default 91 79 1.15:1
AvatarMinimalPerf.default 122 108 1.13:1
ChatDuplicateMessagesPerf.default 169 150 1.13:1
PortalMinimalPerf.default 93 83 1.12:1
RefMinimalPerf.default 119 107 1.11:1
AttachmentMinimalPerf.default 95 86 1.1:1
ChatWithPopoverPerf.default 213 194 1.1:1
CardMinimalPerf.default 330 304 1.09:1
ReactionMinimalPerf.default 224 205 1.09:1
IconMinimalPerf.default 407 377 1.08:1
SegmentMinimalPerf.default 210 197 1.07:1
StatusMinimalPerf.default 410 384 1.07:1
AttachmentSlotsPerf.default 673 634 1.06:1
DropdownMinimalPerf.default 1531 1450 1.06:1
HeaderMinimalPerf.default 223 210 1.06:1
LabelMinimalPerf.default 225 213 1.06:1
ProviderMinimalPerf.default 217 204 1.06:1
TextAreaMinimalPerf.default 299 281 1.06:1
CarouselMinimalPerf.default 279 265 1.05:1
CheckboxMinimalPerf.default 1193 1143 1.04:1
DividerMinimalPerf.default 213 205 1.04:1
DropdownManyItemsPerf.default 412 398 1.04:1
InputMinimalPerf.default 562 540 1.04:1
LoaderMinimalPerf.default 201 194 1.04:1
TextMinimalPerf.default 206 199 1.04:1
VideoMinimalPerf.default 457 438 1.04:1
FlexMinimalPerf.default 162 157 1.03:1
GridMinimalPerf.default 202 197 1.03:1
MenuButtonMinimalPerf.default 1011 977 1.03:1
RadioGroupMinimalPerf.default 271 264 1.03:1
TooltipMinimalPerf.default 1348 1304 1.03:1
BoxMinimalPerf.default 205 201 1.02:1
ButtonOverridesMissPerf.default 694 679 1.02:1
EmbedMinimalPerf.default 1928 1889 1.02:1
FormMinimalPerf.default 228 223 1.02:1
TableManyItemsPerf.default 1150 1125 1.02:1
ToolbarMinimalPerf.default 569 559 1.02:1
DialogMinimalPerf.default 456 451 1.01:1
ListNestedPerf.default 315 313 1.01:1
PopupMinimalPerf.default 358 355 1.01:1
ProviderMergeThemesPerf.default 663 658 1.01:1
SliderMinimalPerf.default 767 763 1.01:1
CustomToolbarPrototype.default 1620 1598 1.01:1
ListMinimalPerf.default 317 317 1:1
MenuMinimalPerf.default 508 506 1:1
SkeletonMinimalPerf.default 205 205 1:1
SplitButtonMinimalPerf.default 2292 2303 1:1
TableMinimalPerf.default 244 244 1:1
TreeMinimalPerf.default 496 494 1:1
AnimationMinimalPerf.default 308 311 0.99:1
ButtonSlotsPerf.default 336 338 0.99:1
ChatMinimalPerf.default 462 468 0.99:1
ItemLayoutMinimalPerf.default 709 714 0.99:1
HeaderSlotsPerf.default 465 475 0.98:1
ImageMinimalPerf.default 222 226 0.98:1
ListCommonPerf.default 394 403 0.98:1
TreeWith60ListItems.default 93 95 0.98:1
RosterPerf.default 1617 1672 0.97:1
DatepickerMinimalPerf.default 4299 4456 0.96:1
ListWith60ListItems.default 364 381 0.96:1
ButtonMinimalPerf.default 73 93 0.78:1

@fabricteam
Copy link
Collaborator

📊 Bundle size report

✅ No changes found

@fabricteam
Copy link
Collaborator

🕵 FluentUIV0 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

🕵 fluentuiv9 No visual regressions between this PR and main

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 657 636 5000
Breadcrumb mount 1689 1679 1000
Checkbox mount 1721 1719 5000
CheckboxBase mount 1490 1462 5000
ChoiceGroup mount 2920 2957 5000
ComboBox mount 670 650 1000
CommandBar mount 6263 6233 1000
ContextualMenu mount 12629 13113 1000
DefaultButton mount 760 757 5000
DetailsRow mount 2199 2199 5000
DetailsRowFast mount 2196 2227 5000
DetailsRowNoStyles mount 2059 2023 5000
Dialog mount 2647 2645 1000
DocumentCardTitle mount 226 222 1000
Dropdown mount 1992 1993 5000
FocusTrapZone mount 1124 1155 5000
FocusZone mount 1088 1084 5000
GroupedList mount 37707 41822 2
GroupedList virtual-rerender 20349 20243 2
GroupedList virtual-rerender-with-unmount 50873 51236 2
GroupedListV2 mount 233 230 2
GroupedListV2 virtual-rerender 207 220 2
GroupedListV2 virtual-rerender-with-unmount 229 227 2
IconButton mount 1125 1091 5000
Label mount 333 323 5000
Layer mount 2719 2738 5000
Link mount 393 399 5000
MenuButton mount 962 919 5000
MessageBar mount 21512 21480 5000
Nav mount 1958 1964 1000
OverflowSet mount 789 784 5000
Panel mount 1785 1801 1000
Persona mount 761 757 1000
Pivot mount 889 872 1000
PrimaryButton mount 860 861 5000
Rating mount 4690 4677 5000
SearchBox mount 911 918 5000
Shimmer mount 1865 1807 5000
Slider mount 1335 1337 5000
SpinButton mount 2903 2890 5000
Spinner mount 389 387 5000
SplitButton mount 1836 1873 5000
Stack mount 404 414 5000
StackWithIntrinsicChildren mount 870 848 5000
StackWithTextChildren mount 2612 2631 5000
SwatchColorPicker mount 6160 6233 5000
TagPicker mount 1437 1428 5000
Text mount 362 372 5000
TextField mount 957 946 5000
ThemeProvider mount 830 839 5000
ThemeProvider virtual-rerender 586 598 5000
ThemeProvider virtual-rerender-with-unmount 1269 1292 5000
Toggle mount 601 609 5000
buttonNative mount 192 194 5000

@Hotell Hotell marked this pull request as ready for review April 19, 2024 10:46
@Hotell Hotell requested a review from a team as a code owner April 19, 2024 10:46
@Hotell Hotell changed the title feat(scripts-tasks): implement 35% faster type-check task feat(scripts-tasks): implement ~36% faster type-check task Apr 19, 2024
@Hotell Hotell merged commit eafbba4 into microsoft:master Apr 23, 2024
21 checks passed
@Hotell Hotell deleted the type-checking-perf/faster-type-check-task branch April 23, 2024 10:41
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Apr 23, 2024
* master: (416 commits)
  fix: remove relative imports within stories which are invalid for creating 'show docs' and circular dep imports from cypress files (microsoft#31087)
  Fix overlapping bars on continuous axes (microsoft#31035)
  feat(scripts-tasks): implement ~36% faster type-check task (microsoft#31116)
  feat(workspace-plugin): implement split-library-in-two migration generator (microsoft#31086)
  applying package updates
  Sankey diagram: Support number formatting (microsoft#31113)
  Fix wrong position of hover callout in case of single data AreaChart (microsoft#30256)
  Combobox filtering bug fix (microsoft#31141)
  chore(react-tag-picker): adds text elliptical clipping example (microsoft#31114)
  docs: command cheat sheet (microsoft#30685)
  chore: refactor tests for createPresenceComponent() (microsoft#31137)
  Stable Release: TeachingPopover (microsoft#31112)
  applying package updates
  fix: SpinButton buttons now show correct visuals at bounds (microsoft#31126)
  feat: add accessibility docs to Link about color/underlines (microsoft#31121)
  fix: Table and DataGrid should not remove cells from the accessibility tree (microsoft#31068)
  Add shadow DOM support to `@fluentui/react` (Fluent v8) (microsoft#30689)
  fix(react-swatch-picker): fixes after bug bash (microsoft#31097)
  feat: unify v9 babel preset in all packages (microsoft#31088)
  applying package updates
  ...
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Apr 23, 2024
* master: (416 commits)
  fix: remove relative imports within stories which are invalid for creating 'show docs' and circular dep imports from cypress files (microsoft#31087)
  Fix overlapping bars on continuous axes (microsoft#31035)
  feat(scripts-tasks): implement ~36% faster type-check task (microsoft#31116)
  feat(workspace-plugin): implement split-library-in-two migration generator (microsoft#31086)
  applying package updates
  Sankey diagram: Support number formatting (microsoft#31113)
  Fix wrong position of hover callout in case of single data AreaChart (microsoft#30256)
  Combobox filtering bug fix (microsoft#31141)
  chore(react-tag-picker): adds text elliptical clipping example (microsoft#31114)
  docs: command cheat sheet (microsoft#30685)
  chore: refactor tests for createPresenceComponent() (microsoft#31137)
  Stable Release: TeachingPopover (microsoft#31112)
  applying package updates
  fix: SpinButton buttons now show correct visuals at bounds (microsoft#31126)
  feat: add accessibility docs to Link about color/underlines (microsoft#31121)
  fix: Table and DataGrid should not remove cells from the accessibility tree (microsoft#31068)
  Add shadow DOM support to `@fluentui/react` (Fluent v8) (microsoft#30689)
  fix(react-swatch-picker): fixes after bug bash (microsoft#31097)
  feat: unify v9 babel preset in all packages (microsoft#31088)
  applying package updates
  ...
miroslavstastny pushed a commit to miroslavstastny/fluentui that referenced this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants