Skip to content

chore(perf-test,vr-tests): update styles to not use CSS shorthands#20821

Merged
layershifter merged 1 commit into
microsoft:masterfrom
layershifter:chore/shorthands-perf-vr
Nov 29, 2021
Merged

chore(perf-test,vr-tests): update styles to not use CSS shorthands#20821
layershifter merged 1 commit into
microsoft:masterfrom
layershifter:chore/shorthands-perf-vr

Conversation

@layershifter

Copy link
Copy Markdown
Member

Pull request checklist

Description of changes

This PR:

  • updates styles to not use CSS shorthands in pert-test
  • updates styles to not use CSS shorthands in vr-tests

@codesandbox-ci

Copy link
Copy Markdown

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 308cd9f:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam

Copy link
Copy Markdown
Collaborator

📊 Bundle size report

🤖 This report was generated against 39306b458b3cfe98ea83fc436ce9663f57f1590f

@size-auditor

size-auditor Bot commented Nov 29, 2021

Copy link
Copy Markdown

Asset size changes

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

Baseline commit: 39306b458b3cfe98ea83fc436ce9663f57f1590f (build)

alignItems: 'stretch',
borderWidth: 0,
borderStyle: 'solid',
borderLeftWidth: 0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could invalidate previous perf results, shouldn't we just use the css shorthand functions instead ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
borderLeftWidth: 0,
borderWidth: ...shorthands.borderWidth(0),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no difference (I had results from the main PR):
image

Why? This test measures re-render price, not style rendering or insertion.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, yeah the different aspects of perf testing :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that less rules inserted would make a difference but in rerender numbers rules are only inserted once anyways

@fabricteam

Copy link
Copy Markdown
Collaborator

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1192 1167 5000
BaseButton mount 1225 1195 5000
Breadcrumb mount 2875 2920 1000
ButtonNext mount 750 767 5000
Checkbox mount 1909 1857 5000
CheckboxBase mount 1641 1644 5000
ChoiceGroup mount 5547 5527 5000
ComboBox mount 1256 1227 1000
CommandBar mount 10900 10971 1000
ContextualMenu mount 9245 9208 1000
DefaultButton mount 1499 1460 5000
DetailsRow mount 4383 4457 5000
DetailsRowFast mount 4423 4464 5000
DetailsRowNoStyles mount 4132 4289 5000
Dialog mount 2879 2879 1000
DocumentCardTitle mount 368 332 1000
Dropdown mount 3706 3735 5000
FluentProviderNext mount 4233 4239 5000
FluentProviderWithTheme mount 384 426 10
FluentProviderWithTheme virtual-rerender 275 255 10
FluentProviderWithTheme virtual-rerender-with-unmount 433 435 10
FocusTrapZone mount 2117 2184 5000
FocusZone mount 2129 2181 5000
IconButton mount 2197 2189 5000
Label mount 540 574 5000
Layer mount 3460 3394 5000
Link mount 711 767 5000
MakeStyles mount 2137 2133 50000
MenuButton mount 1851 1882 5000
MessageBar mount 2307 2274 5000
Nav mount 3942 3797 1000
OverflowSet mount 1348 1392 5000
Panel mount 2755 2806 1000
Persona mount 1101 1133 1000
Pivot mount 1733 1716 1000
PrimaryButton mount 1613 1600 5000
Rating mount 9065 9076 5000
SearchBox mount 1772 1691 5000
Shimmer mount 3067 3043 5000
Slider mount 2371 2325 5000
SpinButton mount 5666 5599 5000
Spinner mount 646 636 5000
SplitButton mount 3646 3797 5000
Stack mount 718 750 5000
StackWithIntrinsicChildren mount 2191 2235 5000
StackWithTextChildren mount 5616 5613 5000
SwatchColorPicker mount 11621 11625 5000
TagPicker mount 3106 3079 5000
TeachingBubble mount 13803 13876 5000
Text mount 607 666 5000
TextField mount 1686 1775 5000
ThemeProvider mount 1465 1397 5000
ThemeProvider virtual-rerender 818 839 5000
ThemeProvider virtual-rerender-with-unmount 2227 2265 5000
Toggle mount 1080 1084 5000
buttonNative mount 284 323 5000

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
IconMinimalPerf.default 789 697 1.13:1
AttachmentMinimalPerf.default 186 171 1.09:1
RefMinimalPerf.default 251 230 1.09:1
TableMinimalPerf.default 477 439 1.09:1
AnimationMinimalPerf.default 508 469 1.08:1
HeaderSlotsPerf.default 912 843 1.08:1
BoxMinimalPerf.default 399 377 1.06:1
SkeletonMinimalPerf.default 414 391 1.06:1
TreeMinimalPerf.default 936 880 1.06:1
ChatWithPopoverPerf.default 448 426 1.05:1
ItemLayoutMinimalPerf.default 1403 1337 1.05:1
PortalMinimalPerf.default 194 185 1.05:1
ReactionMinimalPerf.default 449 429 1.05:1
DialogMinimalPerf.default 863 830 1.04:1
DividerMinimalPerf.default 424 409 1.04:1
LayoutMinimalPerf.default 419 401 1.04:1
MenuMinimalPerf.default 976 935 1.04:1
SegmentMinimalPerf.default 411 397 1.04:1
AlertMinimalPerf.default 317 308 1.03:1
FormMinimalPerf.default 486 470 1.03:1
GridMinimalPerf.default 405 393 1.03:1
HeaderMinimalPerf.default 438 427 1.03:1
ImageMinimalPerf.default 443 431 1.03:1
ListCommonPerf.default 762 742 1.03:1
ListMinimalPerf.default 595 579 1.03:1
PopupMinimalPerf.default 641 624 1.03:1
ProviderMinimalPerf.default 1255 1220 1.03:1
TooltipMinimalPerf.default 1153 1123 1.03:1
AttachmentSlotsPerf.default 1208 1179 1.02:1
ButtonOverridesMissPerf.default 1858 1827 1.02:1
ButtonSlotsPerf.default 632 617 1.02:1
CheckboxMinimalPerf.default 2925 2870 1.02:1
LabelMinimalPerf.default 448 438 1.02:1
RadioGroupMinimalPerf.default 516 507 1.02:1
AccordionMinimalPerf.default 182 180 1.01:1
AvatarMinimalPerf.default 230 227 1.01:1
CardMinimalPerf.default 641 632 1.01:1
ChatDuplicateMessagesPerf.default 335 331 1.01:1
DatepickerMinimalPerf.default 5966 5921 1.01:1
DropdownManyItemsPerf.default 784 777 1.01:1
InputMinimalPerf.default 1409 1389 1.01:1
StatusMinimalPerf.default 764 755 1.01:1
TextAreaMinimalPerf.default 597 589 1.01:1
TreeWith60ListItems.default 209 206 1.01:1
DropdownMinimalPerf.default 3193 3201 1:1
ListWith60ListItems.default 754 754 1:1
LoaderMinimalPerf.default 760 759 1:1
MenuButtonMinimalPerf.default 1845 1840 1:1
SliderMinimalPerf.default 1815 1823 1:1
TableManyItemsPerf.default 2191 2199 1:1
CustomToolbarPrototype.default 4385 4402 1:1
ButtonMinimalPerf.default 204 206 0.99:1
ChatMinimalPerf.default 760 764 0.99:1
EmbedMinimalPerf.default 4504 4569 0.99:1
RosterPerf.default 1325 1344 0.99:1
ProviderMergeThemesPerf.default 1793 1805 0.99:1
VideoMinimalPerf.default 739 743 0.99:1
SplitButtonMinimalPerf.default 4669 4759 0.98:1
ToolbarMinimalPerf.default 1031 1048 0.98:1
FlexMinimalPerf.default 310 319 0.97:1
ListNestedPerf.default 626 645 0.97:1
CarouselMinimalPerf.default 519 538 0.96:1
TextMinimalPerf.default 399 414 0.96:1

@layershifter
layershifter merged commit cfb9eea into microsoft:master Nov 29, 2021
@layershifter
layershifter deleted the chore/shorthands-perf-vr branch November 29, 2021 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants