-
Notifications
You must be signed in to change notification settings - Fork 357
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
perf: improve too many user api call #4763
perf: improve too many user api call #4763
Conversation
✅ Deploy Preview for determined-ui canceled.
|
854eb94
to
b137453
Compare
3308531
to
c8ef508
Compare
|
|
||
useEffect(() => { | ||
if (!userId) return; | ||
if (!users.length) fetchUsers(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When lots of user avatars is rendered at once fetchUsers
is called many times, so fetchUsers
is moved in App.tsx
and call once.
This implementation should be fine because lots of components is polling fetchUsers
every few seconds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
DET-7962
Test Plan
Commentary (optional)
Checklist
docs/release-notes/
.See Release Note for details.
/webui/react/src/shared/
verifymake -C webui/react test-shared
passes.