Skip to content

fix: Optimize Avatar Loading#951

Merged
Xsy41 merged 4 commits intohypertrons:masterfrom
Xsy41:fix/Optimize-Avatar-Loading
Mar 4, 2025
Merged

fix: Optimize Avatar Loading#951
Xsy41 merged 4 commits intohypertrons:masterfrom
Xsy41:fix/Optimize-Avatar-Loading

Conversation

@Xsy41
Copy link
Collaborator

@Xsy41 Xsy41 commented Feb 18, 2025

Brief Information

This pull request is in the type of (more info about types):

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • test

Related issues (all available keywords):

Details

Each month, the top 15 most active developers are selected based on their activity data and added to a set. Then, only the avatars of these active developers are loaded, optimizing the avatar loading efficiency.

Checklist

Others

@Xsy41
Copy link
Collaborator Author

Xsy41 commented Feb 18, 2025

Here’s the revised version with all three examples included:

Stats: The number of loaded developer avatars decreased from 1673 to 550.
(https://github.com/exelban/stats)

Vue.js: The number of loaded developer avatars decreased from 6700 to 1700.
(https://github.com/vuejs/vue)

TensorFlow: The number of loaded developer avatars decreased from 1300 to 500.
(https://github.com/tensorflow/tensorflow)

@wangyantong2000 wangyantong2000 marked this pull request as draft February 18, 2025 15:32
@wangyantong2000
Copy link
Collaborator

image The date and image overlap.

tip={`Loading avatars ${loadedAvatars}/${contributors.length}`}
style={{ maxHeight: 'none' }} // disable maxHeight to make the loading tip be placed in the center
spinning={isLoading || loadedAvatars < totalAvatars}
tip={`Loading ${currentMonth} avatars (${loadedAvatars}/${totalAvatars})`}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add another configuration in both Chinese and English.Although it hasn't happened before either.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok

@wangyantong2000
Copy link
Collaborator

This loading is indeed much faster than before.

@Xsy41
Copy link
Collaborator Author

Xsy41 commented Mar 4, 2025

image The date and image overlap.

In most cases, this date does not obstruct the data. It only blocks the view in rare instances. Additionally, the date is transparent and does not affect the visual experience. Do we need to reduce the size of the date icon or change its position?

@wangyantong2000
Copy link
Collaborator

image The date and image overlap.

In most cases, this date does not obstruct the data. It only blocks the view in rare instances. Additionally, the date is transparent and does not affect the visual experience. Do we need to reduce the size of the date icon or change its position?

Yes, you can make some changes

@Xsy41 Xsy41 marked this pull request as ready for review March 4, 2025 12:50
@Xsy41 Xsy41 merged commit 214eabb into hypertrons:master Mar 4, 2025
3 checks passed
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.

[Optimize] It is possible to optimise the logic used to load numerous contributor avatars.

2 participants