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

remove redundant code from action-bar-element #3216

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

keithamus
Copy link
Member

@keithamus keithamus commented Dec 3, 2024

What are you trying to accomplish?

In our fortnightly performance mob-pairing session we noticed that there's a large Recalculate Style going on because action-bar-element loops through all the items to calculate the width to supply to the data-offset-width attribute. It turns out though, that this attribute isn't actually used any more, so this code is entirely redundant.

a performance trace showing Recalc Style on an action bar element

In #2425 the action bar code was refactored and the places that used data-offset-width were removed, however this loop remained.

By simply deleting this code we can eradicate a sometimes very expensive recalc right out of the hot path.

/cc my partners in crime @AdamShwert, @alondahari, @arelia, @camchenry, @ctmayn, @Cbodfield, @dgreif, @jibrang, @francinelucca

Screenshots

Integration

List the issues that this change affects.

Closes # (type the GitHub issue number after #)

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

What approach did you choose and why?

Anything you want to highlight for special attention from reviewers?

Accessibility

  • Fixes axe scan violation - This change fixes an existing axe scan violation.
  • No new axe scan violation - This change does not introduce any new axe scan violations.
  • New axe violation - This change introduces a new axe scan violation. Please describe why the violation cannot be resolved below.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

This comment was marked as resolved.

Copy link
Contributor

github-actions bot commented Dec 3, 2024

⚠️ Visual differences found

Our visual comparison tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.

Review visual differences

This comment was marked as resolved.

@keithamus keithamus force-pushed the remove-redundant-code-from-action-bar-element branch from 7043c09 to 8c79807 Compare December 3, 2024 17:58
Co-authored-by: AdamShwert <[email protected]>
Co-authored-by: Alon Dahari <[email protected]>
Co-authored-by: Arelia Jones <[email protected]>
Co-authored-by: Cam McHenry <[email protected]>
Co-authored-by: Chris Maynard <[email protected]>
Co-authored-by: Cody Bodfield <[email protected]>
Co-authored-by: Dusty Greif <[email protected]>
Co-authored-by: Jibran Garcia <[email protected]>
Co-authored-by: Marie Lucca <[email protected]>
@keithamus keithamus force-pushed the remove-redundant-code-from-action-bar-element branch from 9451345 to 04f653b Compare December 3, 2024 18:10
@keithamus keithamus marked this pull request as ready for review December 3, 2024 18:13
@keithamus keithamus requested a review from a team as a code owner December 3, 2024 18:13
@github-actions github-actions bot requested a review from a team as a code owner December 3, 2024 18:17
@github-actions github-actions bot requested a review from tbenning December 3, 2024 18:17
Copy link
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

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

Not sure why the form images changed 🤔

@jonrohan jonrohan enabled auto-merge (squash) December 3, 2024 20:29
@jonrohan jonrohan merged commit 23dd4fa into main Dec 3, 2024
33 of 34 checks passed
@jonrohan jonrohan deleted the remove-redundant-code-from-action-bar-element branch December 3, 2024 20:35
@primer primer bot mentioned this pull request Dec 3, 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