Skip to content

perf(leaderboard): memoize table rows with stable keys#358

Closed
abdrassulov wants to merge 1 commit into
Grainlify:mainfrom
abdrassulov:perf/leaderboard-table-memo
Closed

perf(leaderboard): memoize table rows with stable keys#358
abdrassulov wants to merge 1 commit into
Grainlify:mainfrom
abdrassulov:perf/leaderboard-table-memo

Conversation

@abdrassulov

Copy link
Copy Markdown
Contributor

📌 Description

This PR improves leaderboard performance by extracting and memoizing row components for both contributors and projects, utilizing stable keys instead of array indices.

✅ Solution

  • Extracted in and wrapped it in . Used as stable keys.
  • Extracted in and wrapped it in . Used uid=501(rakhimzhanabdrassulov) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),701(com.apple.sharepoint.group.1),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae) as stable keys.
  • Memoized the derived top-three lists ( and ) in using .
  • Added comprehensive render-count/memoization tests in and asserting that the row components are indeed memoized.

🧪 Test Results

All 21 vitest unit and integration tests compile and pass successfully!

@Jagadeeshftw

Copy link
Copy Markdown
Contributor

hey @abdrassulov, thanks for the contribution! closing this one because we couldn't find a linked issue. to keep things organized: please comment on an open issue to get assigned first, then raise your pr referencing it. happy to see you back once you've been assigned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants