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

chore: refactor Webpack contexts in Fluent docs to improve treeshaking #14843

Merged
merged 6 commits into from
Sep 16, 2020

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Sep 1, 2020

This PR:

Before

image

After

image

@layershifter layershifter reopened this Sep 1, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 1, 2020

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 22999b0:

Sandbox Source
Fluent UI Button Configuration
microsoft/fluentui: codesandbox-react-template Configuration

@msft-github-bot
Copy link
Contributor

msft-github-bot commented Sep 1, 2020

Perf Analysis

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 883 892 5000
ButtonNext mount 568 571 5000
Checkbox mount 1575 1550 5000
CheckboxBase mount 1257 1260 5000
CheckboxNext mount 1537 1481 5000
ChoiceGroup mount 4900 4957 5000
ChoiceGroupNext mount 4925 4922 5000
ComboBox mount 936 934 1000
CommandBar mount 7836 7806 1000
ContextualMenu mount 14815 16063 1000
DefaultButton mount 1085 1107 5000
DetailsRow mount 3504 3641 5000
DetailsRowFast mount 3589 3546 5000
DetailsRowNoStyles mount 3432 3378 5000
Dialog mount 1492 1452 1000
DocumentCardTitle mount 1849 1821 1000
Dropdown mount 2659 2578 5000
FocusZone mount 1869 1863 5000
IconButton mount 1746 1771 5000
Label mount 337 344 5000
Link mount 437 440 5000
LinkNext mount 483 467 5000
MenuButton mount 1459 1448 5000
MessageBar mount 2097 2134 5000
MessageBarNext mount 2097 2036 5000
Nav mount 3263 3202 1000
OverflowSet mount 1444 1450 5000
OverflowSetNext mount 1039 1049 5000
Panel mount 1441 1462 1000
Persona mount 819 834 1000
Pivot mount 1401 1408 1000
PivotNext mount 1384 1377 1000
PrimaryButton mount 1244 1250 5000
Rating mount 7474 7485 5000
RatingNext mount 7461 7427 5000
SearchBox mount 1254 1282 5000
SearchBoxNext mount 1318 1327 5000
Shimmer mount 2522 2589 5000
ShimmerNext mount 2610 2510 5000
Slider mount 1503 1528 5000
SliderNext mount 1893 1935 5000
SpinButton mount 5068 4923 5000
SpinButtonNext mount 5090 5098 5000
Spinner mount 432 433 5000
SplitButton mount 3119 3142 5000
Stack mount 551 536 5000
StackWithIntrinsicChildren mount 1907 1920 5000
StackWithTextChildren mount 4944 4985 5000
SwatchColorPicker mount 10340 10399 5000
SwatchColorPickerNext mount 10159 10213 5000
TagPicker mount 2695 2783 5000
TeachingBubble mount 51125 52088 5000
TeachingBubbleNext mount 51149 51608 5000
Text mount 410 426 5000
TextField mount 1392 1351 5000
ThemeProvider mount 4901 4921 5000
ThemeProvider virtual-rerender 513 513 5000
Toggle mount 812 847 5000
ToggleNext mount 799 796 5000
button mount 113 124 5000

Perf Analysis (Fluent)

⚠️ 5 potential perf regressions detected

Potential regressions comparing to master

Scenario Current PR Ticks Baseline Ticks Ratio Regression Analysis
ButtonOverridesMissPerf.default 1727 46 37.54:1 analysis
ButtonUseCssNestingPerf.default 1108 44 25.18:1 analysis
ButtonUseCssPerf.default 821 46 17.85:1 analysis
ChatWithPopoverPerf.default 487 457 1.07:1 analysis
ListCommonPerf.default 685 955 0.72:1 analysis
Perf comparison
Status Scenario Fluent TPI Fabric TPI Ratio Iterations Ticks
🎯 Avatar.Fluent 0.46 0.49 0.94:1 2000 915
🦄 Button.Fluent 0.12 0.19 0.63:1 5000 587
🔧 Checkbox.Fluent 0.65 0.34 1.91:1 1000 654
🎯 Dialog.Fluent 0.16 0.22 0.73:1 5000 795
🔧 Dropdown.Fluent 2.96 0.48 6.17:1 1000 2955
🔧 Icon.Fluent 0.14 0.06 2.33:1 5000 709
🦄 Image.Fluent 0.08 0.12 0.67:1 5000 422
🔧 Slider.Fluent 1.58 0.35 4.51:1 1000 1584
🔧 Text.Fluent 0.07 0.03 2.33:1 5000 368
🦄 Tooltip.Fluent 0.11 16.94 0.01:1 5000 564

🔧 Needs work     🎯 On target     🦄 Amazing

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
PortalMinimalPerf.default 170 114 1.49:1
RefMinimalPerf.default 261 203 1.29:1
TextAreaMinimalPerf.default 501 412 1.22:1
FlexMinimalPerf.default 323 266 1.21:1
FormMinimalPerf.default 450 375 1.2:1
Image.Fluent 422 351 1.2:1
SegmentMinimalPerf.default 376 316 1.19:1
ImageMinimalPerf.default 400 339 1.18:1
LayoutMinimalPerf.default 441 376 1.17:1
BoxMinimalPerf.default 378 327 1.16:1
ReactionMinimalPerf.default 437 377 1.16:1
TextMinimalPerf.default 372 322 1.16:1
StatusMinimalPerf.default 749 653 1.15:1
Text.Fluent 368 321 1.15:1
GridMinimalPerf.default 356 313 1.14:1
LabelMinimalPerf.default 435 383 1.14:1
Button.Fluent 587 518 1.13:1
AnimationMinimalPerf.default 426 379 1.12:1
ListMinimalPerf.default 508 453 1.12:1
SkeletonMinimalPerf.default 451 402 1.12:1
TableMinimalPerf.default 426 381 1.12:1
AttachmentMinimalPerf.default 168 152 1.11:1
HeaderMinimalPerf.default 381 343 1.11:1
AlertMinimalPerf.default 310 282 1.1:1
Tooltip.Fluent 564 512 1.1:1
CardMinimalPerf.default 600 549 1.09:1
RadioGroupMinimalPerf.default 438 403 1.09:1
AvatarMinimalPerf.default 481 447 1.08:1
ChatMinimalPerf.default 643 598 1.08:1
DividerMinimalPerf.default 376 349 1.08:1
MenuMinimalPerf.default 873 806 1.08:1
PopupMinimalPerf.default 701 649 1.08:1
TooltipMinimalPerf.default 823 760 1.08:1
Checkbox.Fluent 654 606 1.08:1
ToolbarMinimalPerf.default 981 917 1.07:1
Avatar.Fluent 915 854 1.07:1
Dialog.Fluent 795 740 1.07:1
AccordionMinimalPerf.default 162 153 1.06:1
AttachmentSlotsPerf.default 1168 1105 1.06:1
ButtonMinimalPerf.default 176 166 1.06:1
CarouselMinimalPerf.default 476 449 1.06:1
DialogMinimalPerf.default 792 748 1.06:1
HeaderSlotsPerf.default 798 750 1.06:1
MenuButtonMinimalPerf.default 1596 1509 1.06:1
ProviderMergeThemesPerf.default 2050 1941 1.06:1
IconMinimalPerf.default 672 636 1.06:1
TreeMinimalPerf.default 887 833 1.06:1
VideoMinimalPerf.default 649 611 1.06:1
ChatDuplicateMessagesPerf.default 438 419 1.05:1
ItemLayoutMinimalPerf.default 1279 1219 1.05:1
Icon.Fluent 709 676 1.05:1
DropdownManyItemsPerf.default 750 720 1.04:1
LoaderMinimalPerf.default 767 734 1.04:1
SliderMinimalPerf.default 1648 1579 1.04:1
ProviderMinimalPerf.default 972 944 1.03:1
CustomToolbarPrototype.default 3814 3710 1.03:1
CheckboxMinimalPerf.default 2896 2842 1.02:1
EmbedMinimalPerf.default 1906 1873 1.02:1
InputMinimalPerf.default 1355 1325 1.02:1
SplitButtonMinimalPerf.default 3804 3733 1.02:1
ButtonSlotsPerf.default 618 609 1.01:1
DropdownMinimalPerf.default 2967 2940 1.01:1
Dropdown.Fluent 2955 2933 1.01:1
Slider.Fluent 1584 1574 1.01:1
TreeWith60ListItems.default 210 210 1:1
TableManyItemsPerf.default 2136 2148 0.99:1
ListWith60ListItems.default 958 1147 0.84:1
ListNestedPerf.default 605 882 0.69:1

@size-auditor
Copy link

size-auditor bot commented Sep 1, 2020

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 7d093f59a06527fc39656c903cab4470650e3acd (build)

@layershifter layershifter merged commit 006119f into master Sep 16, 2020
@layershifter layershifter deleted the chore/do-not-use-sr-for-max-view branch September 16, 2020 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fluent UI react-northstar (v0) Work related to Fluent UI V0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants