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

Multiple requests to same resource #293

Closed
js0mmer opened this issue May 5, 2023 · 2 comments
Closed

Multiple requests to same resource #293

js0mmer opened this issue May 5, 2023 · 2 comments
Labels
frontend Front End tasks Story Point: 5 major new product feature that requires designs, product ideation and the involvement of the tech le

Comments

@js0mmer
Copy link
Member

js0mmer commented May 5, 2023

For most pages you visit on PeterPortal, multiple requests to the same path are logged in the backend terminal. I think some of these are due to redundant useEffect hooks such as the one found in #290 but some investigating may need to be done. We want to fix this for better optimization.
Example:
All of these requests are made after visiting the home page once. Many are repeated.
multiple requests

@js0mmer js0mmer moved this to Backlog in PeterPortal Client May 6, 2023
@js0mmer js0mmer added frontend Front End tasks Story Point: 3 backend or full-stack change. maybe adding an endpoint or changing the response of an endpoint + the Story Point: 5 major new product feature that requires designs, product ideation and the involvement of the tech le and removed Story Point: 3 backend or full-stack change. maybe adding an endpoint or changing the response of an endpoint + the labels May 6, 2023
@js0mmer
Copy link
Member Author

js0mmer commented May 28, 2023

It looks like the multiple requests to GET /api/users/isAdmin are due to a useEffect call on every render that requests that. This can be fixed by adding a dependency array so it is only called on login/logout. Will split this off into a separate issue (#319).

@js0mmer
Copy link
Member Author

js0mmer commented Feb 15, 2024

Looks like this has been fixed by #297 and #421.

@js0mmer js0mmer closed this as completed Feb 15, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in PeterPortal Client Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Front End tasks Story Point: 5 major new product feature that requires designs, product ideation and the involvement of the tech le
Projects
Development

No branches or pull requests

1 participant