Skip to content

[Emotion][perf] Memoize low-impact components (D-F)#7637

Closed
cee-chen wants to merge 7 commits intoelastic:mainfrom
cee-chen:emotion/memoization-3
Closed

[Emotion][perf] Memoize low-impact components (D-F)#7637
cee-chen wants to merge 7 commits intoelastic:mainfrom
cee-chen:emotion/memoization-3

Conversation

@cee-chen
Copy link
Copy Markdown
Contributor

@cee-chen cee-chen commented Mar 29, 2024

Summary

Basically every component that isn't on the medium impact list (#7561) and was easier to do a quick skim through. Some of the commits/components have extra cleanup in terms of useMemo usage, preferring inline JSX, and removing array/obj definitions. As always, I recommend following by commit.

QA

  • Quick smoke test of all the affected components

General checklist

  • Browser QA - Skipping cross-browser testing in favor of smoke testing
  • Docs site QA - N/A
  • Code quality checklist - N/A
  • Release checklist - N/A, skipping changelog due to this being perf tech debt that shouldn't impact consumers
  • Designer checklist - N/A

+ simplify styles array

- not sure I love the extra inline styles always being memoized even if they aren't used, but c'est la vie
@cee-chen cee-chen added skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) tech debt emotion performance labels Mar 29, 2024
+ remove unnecessary function for styles w/ no theme token

+ inline JSX where possible
- disabled opacity is fairly static and can be DRYed out

- loading spinner: no styles being applied so this isn't necessary
+ remove passed `layout` arg in favor of static definitions

- rewrite vertical vs horizontal gutters utils to be slightly less confusing

+ replace `calc()` with `mathWithUnits()`
+ prefer inline JSX
@cee-chen cee-chen force-pushed the emotion/memoization-3 branch from 619e1a8 to ea2b89d Compare March 29, 2024 22:37
@kibanamachine
Copy link
Copy Markdown

Preview staging links for this PR:

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

@github-actions
Copy link
Copy Markdown

👋 Hey there. This PR hasn't had any activity for 90 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@github-actions github-actions bot added the stale-pr (Don't delete - used for automation) label Jun 28, 2024
@cee-chen cee-chen removed the stale-pr (Don't delete - used for automation) label Jun 28, 2024
@github-actions
Copy link
Copy Markdown

👋 Hey there. This PR hasn't had any activity for 90 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@github-actions github-actions bot added the stale-pr (Don't delete - used for automation) label Sep 27, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 4, 2024

❌ We're automatically closing this PR due to lack of activity. Please comment if you feel this was done in error.

@github-actions github-actions bot added the stale-pr-closed (Don't delete - used for automation) label Oct 4, 2024
@github-actions github-actions bot closed this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emotion performance skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) stale-pr (Don't delete - used for automation) stale-pr-closed (Don't delete - used for automation) tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants