fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Performance drag due to styled HOC is passing new function every time on render

Open LiangMingChen opened this issue 7 years ago • 1 comments

Environment Information

  • Package version(s): (fill this out)
  • Browser and OS versions: (fill this out if relevant)

Please provide a reproduction of the bug in a codepen:

Actual behavior:

This is reported on Performance drag due to styled HOC is passing new function every time on render #8769 https://github.com/OfficeDev/office-ui-fabric-react/issues/8769

image

Expected behavior:

The fix doesn't address the issue. Doesn't think the change fix the

The new change at https://github.com/dzearing/office-ui-fabric-react/blob/07833d5e3e463f8332b87a33b0bfaec43647f7c9/packages/utilities/src/styled.tsx#L87

At end of day, when you return the JSX, you are giveing the new styles function (at line 84 a new function every single time. Regardless where you move the function.

Please do a profile with DetailListView to find out (which base have a componentWillReceiveProps.) #8764

And please add test. The merge change doesn't have a test.

Priorities and help requested:

Are you willing to submit a PR to fix? (Yes, No)

Requested priority: (Blocking, High, Normal, Low)

Products/sites affected: (if applicable)

LiangMingChen avatar Apr 19 '19 00:04 LiangMingChen

Closing in favor of the original issue.

ecraig12345 avatar Apr 19 '19 01:04 ecraig12345