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

refactor: Improvements in Entry.resolveLinks #417

Merged
merged 8 commits into from
Nov 19, 2024

Conversation

gmoraleda
Copy link
Contributor

Summary

This PR aims at improving the speed of the resolveLinks function.

  • Moved casting to [Link] to the first swift statement.
  • Moving to the next item if the array of links does not require resolution or is cached.
  • Caching the array of resolved links after processing them.

Also

  • Corrected typos here and there
  • Extracted nested function inside sync for fetching types -> handleContentTypeFetch

Discussion

The observed sync times using the space p557f7qi815g went from around 8 seconds to the lower end of the 7 seconds.
Still a marginal gain but a small improvement in any case.

@gmoraleda gmoraleda requested a review from a team as a code owner November 18, 2024 12:01
@gmoraleda gmoraleda changed the title refactor: Improvements in Entry. resolveLinks refactor: Improvements in Entry.resolveLinks Nov 18, 2024
Guillermo Moraleda added 2 commits November 18, 2024 21:12
@jjolton-contentful jjolton-contentful merged commit ef80980 into contentful:master Nov 19, 2024
5 checks passed
@gmoraleda gmoraleda deleted the refactor/improvements branch November 20, 2024 08:06
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.

3 participants