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

Optimize post method of the Settings class #86

Closed
kwajiehao opened this issue Dec 3, 2020 · 0 comments · Fixed by #92
Closed

Optimize post method of the Settings class #86

kwajiehao opened this issue Dec 3, 2020 · 0 comments · Fixed by #92
Labels
enhancement New feature or request P2 Nice to have for MVP

Comments

@kwajiehao
Copy link
Contributor

kwajiehao commented Dec 3, 2020

Currently, we make multiple API calls to update the various settings files (_config.yml, _data/navigation.yml, _data/footer.yml) even if no changes have been made to some of those files. Since, we are unable to make concurrent POST calls to GitHub, this results in the saving process for the Settings layout on the frontend to be very slow (currently it takes more than 7 seconds).

For example, if we receive a payload where only the title field has been modified, we should only update the _config.yml file. This would let our code run faster since we don't have to wait for the outcome of the other two meaningless API calls.

Resolving this issue might involve changing frontend code, since currently the frontend sends the data for all the fields that are displayed on the Settings layout. We need to modify the frontend to only send modified data, not all data present on the page.

@kwajiehao kwajiehao added enhancement New feature or request P2 Nice to have for MVP labels Dec 3, 2020
@kwajiehao kwajiehao linked a pull request Dec 8, 2020 that will close this issue
@kwajiehao kwajiehao linked a pull request Dec 9, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 Nice to have for MVP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant