Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Performance: Use $attrs to manage styles #245

Merged
merged 132 commits into from
Jul 16, 2020

Conversation

codebender828
Copy link
Collaborator

@codebender828 codebender828 commented Jun 28, 2020

Performance: Use $attrs to manage styles

Closes #241

Description

This pull request seeks to provide an improvement in performance in the component primitives.

After doing some investigation here, and a large portion of the performance expense has to do with how the Chakra primitives are managing their props. Because of the props architecture with Vue, quite a lot of logic runs in between merging of consumer + default props.

To improve performance we sought to use the component $attrs as opposed to props resolution.

View demo:

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@vercel
Copy link

vercel bot commented Jun 28, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/chakra-ui/chakra-ui-vue/inz8oot5n
✅ Preview: https://chakra-ui-vue-git-refactor-primitive-performance.chakra-ui.vercel.app

@codebender828 codebender828 added status: work in progress 🐜 Someone is working on this type: feature or enhancement ⚡️ New feature or request labels Jun 28, 2020
@codebender828 codebender828 mentioned this pull request Jun 28, 2020
8 tasks
@vercel vercel bot temporarily deployed to Preview June 28, 2020 12:47 Inactive
@codebender828 codebender828 self-assigned this Jun 28, 2020
@codebender828 codebender828 changed the base branch from master to develop June 29, 2020 03:36
@vercel vercel bot temporarily deployed to Preview July 1, 2020 14:56 Inactive
@codebender828 codebender828 changed the title [WIP]: Performance: Use $attrs to manage styles Performance: Use $attrs to manage styles Jul 16, 2020
@codebender828 codebender828 requested a review from koca July 16, 2020 16:13
@codebender828 codebender828 marked this pull request as ready for review July 16, 2020 16:13
@codebender828 codebender828 removed the status: work in progress 🐜 Someone is working on this label Jul 16, 2020
@vercel vercel bot temporarily deployed to Preview July 16, 2020 18:50 Inactive
@codebender828 codebender828 merged commit 0c8b18a into develop Jul 16, 2020
@codebender828 codebender828 mentioned this pull request Jul 16, 2020
8 tasks
@codebender828 codebender828 deleted the refactor/primitive-performance branch July 25, 2020 18:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Performance issue with hundreds of CBox nodes.
2 participants