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

[RFC] Create table v2 to resolve performance issues #207

Merged
merged 3 commits into from
May 1, 2024
Merged

Conversation

maxatdetroit
Copy link
Member

@maxatdetroit maxatdetroit commented Apr 29, 2024

Part of #199

Status: requesting comments/feedback

This PR introduces table v2. Table v2 makes the following changes in an attempt to improve the lifecycle performance of the original table component:

  1. Eliminate all custom elements (rows, cells, headers) except for the cod-table element itself
  2. Keep all content in the shadowDOM and dynamically slot each cell into its own slot to allow for lightDOM content styling
    1. Note: this was necessary since the shadowDOM styling requires selecting the table cells.

I've only tested the performance difference in storybook dev build, but there's about a 40% improvement (1.29s -> .91s) in time to render a basic table with 4 rows. If we agree this is a reasonable approach, I'll stress test this approach using the bus schedule table (with lots of data). Assuming that goes well, I'll build out the remaining styles/features for this element and replace v1 table with this implementation.

image

Chrome Performance Profiles:

@maxatdetroit maxatdetroit added enhancement New feature or request performance Improve performance of an existing feature labels Apr 29, 2024
@maxatdetroit maxatdetroit requested a review from jedgar1mx April 29, 2024 19:54
@maxatdetroit maxatdetroit self-assigned this Apr 29, 2024
@maxatdetroit maxatdetroit linked an issue Apr 29, 2024 that may be closed by this pull request
@jedgar1mx jedgar1mx merged commit e1becdf into dev May 1, 2024
5 checks passed
@jedgar1mx jedgar1mx deleted the issue.199 branch May 1, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Improve performance of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix performance issues in table components
2 participants