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

Fetch of currency data delays start by several seconds #50

Open
tdaede opened this issue Dec 22, 2019 · 6 comments
Open

Fetch of currency data delays start by several seconds #50

tdaede opened this issue Dec 22, 2019 · 6 comments
Labels
bug cli For issues related to Rink CLI specifically

Comments

@tdaede
Copy link

tdaede commented Dec 22, 2019

It would be nice to lazily update currency info in the background.

@polyzen
Copy link

polyzen commented Jul 18, 2020

I'd like to note a finding with today's Cloudflare hiccup: rink will not launch while there is no internet connection (or at least no DNS resolution).

@whitequark
Copy link
Contributor

Yep, I hit that regularly.

@tiffany352
Copy link
Owner

I changed the timeout to 2 seconds and made it so that it will attempt to reuse the existing cached file if the request fails. I hope that will fix the issue, although the eventual solution would definitely be to fetch it in the background asynchronously.

I had a bit of trouble testing it though, so let me know if you run into any issues. This is included in the 0.5 release.

@whitequark
Copy link
Contributor

Thank you, works well for me!

@tiffany352 tiffany352 added bug cli For issues related to Rink CLI specifically labels Aug 7, 2020
@tiffany352
Copy link
Owner

I was having issues with currency fetching timing out after 2 seconds or otherwise taking over a second to complete. The server also went down sometimes for seemingly no reason.

rinkcalc.app is now behind a CDN which should help a lot, especially in countries with bad peering to the US. Requests for currency.json now consistently take less than 100ms for me but I live relatively close to one of their POPs.

This ticket will stay open. I really want to make currency fetching only happen when you actually go to use currency units, rather than blocking startup.

@whitequark
Copy link
Contributor

Nice! Thank you @tiffany352, I kept hitting this every once in a while. Rink is so core to my workflow these days that I just lived with it, but it was a little annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cli For issues related to Rink CLI specifically
Projects
None yet
Development

No branches or pull requests

4 participants