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

Some optimization suggestions #83

Closed
muratcorlu opened this issue Feb 5, 2024 · 2 comments
Closed

Some optimization suggestions #83

muratcorlu opened this issue Feb 5, 2024 · 2 comments

Comments

@muratcorlu
Copy link

I congratulate you for this nice initiative. When I investigated the repository, I noticed some improvement areas:

  1. Use Calver versioning system instead of putting historical data to folders. This will lead getting rid of huge amount of folders/files and a convenient way of reaching historical data for consumers. For example, an historical request would be:
https://cdn.jsdelivr.net/gh/fawazahmed0/[email protected]/currencies/eur.json

You can achieve this by tagging commits or publishing package to npm with that version in every release. As a plus, people can easily get list of dates (versions) with the api provided by jsdelivr.

  1. Don't push minified versions to Git repo. Jsdelivr can already provide minified versions automatically.
  2. Use NPM instead of GitHub as the source of jsdelivr. NPM is better for this both for jsdelivr and consumers. Jsdelivr suggests using NPM over Github since it can fetch files from NPM faster. Also if you use NPM, some people can use other NPM CDNs (like unpkg) if they need.
  3. jsdelivr has an API endpoint to purge cache. You can call those endpoints after every new data release, so people can start consuming new data as soon as possible. That can also address inconsistency issues like Dates of eur.json and eur/jpy.json are not same sometimes #49, Delay when trying to retrieve the latest conversion rates from USD #73 .

Success!

@RaptaG
Copy link

RaptaG commented Feb 11, 2024

Wow, these are some awesome suggestions, especially now that action times have reached >5 hours to complete. I really hope @fawazahmed0 considers them!

@fawazahmed0 fawazahmed0 transferred this issue from another repository Feb 29, 2024
@fawazahmed0
Copy link
Owner

currency-api has stopped working, Please read the migration guide

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

3 participants