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

All courses being fetched in course outline page. #1655

Open
vunguyen-dmt opened this issue Feb 13, 2025 · 1 comment
Open

All courses being fetched in course outline page. #1655

vunguyen-dmt opened this issue Feb 13, 2025 · 1 comment

Comments

@vunguyen-dmt
Copy link

When you go to a course outline, open network tab in the Developer console you will see a request like this /api/contentstore/v1/home/courses which fetches all courses in one instance.
I don't know if this data is being used for anything, but even if it is, it is still a major performance issue.
The code and the file are below:
useEffect(() => { dispatch(fetchStudioHomeData()); }, []);

https://github.com/openedx/frontend-app-authoring/blob/master/src/CourseAuthoringPage.jsx

@bradenmacdonald
Copy link
Contributor

Loading the data via React Query rather than redux actions would make it cached and solve this problem.

Though I also find the idea of a "studio home" API to be a bit of an anti-pattern. It's obviously used to fetch data on other pages besides home, and these days its considered best practice to split into smaller API requests rather than one big one that likely loads more data than you need. I'm not sure whether putting it all into one studio home API was for optimization purposes or what but it does seem unusual.

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

No branches or pull requests

2 participants