-
Notifications
You must be signed in to change notification settings - Fork 9
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
hit_api #20
Comments
I am almost entirely certain that httr::RETRY never returns for one of these endpoints, for reasons I never got to the bottom of -- worth finding the commit instead of running into the same issue again |
Found the commit at least, but past me was not kind enough to leave comments about the issue |
Ok, found (part of) why I removed httr::RETRY initially. There's a real performance impact when using RETRY for reasons I don't entirely understand -- there's a huge performance hit to RETRY vs my manual backoff implementation, and RETRY occasionally fails with very unfriendly (to me and the debugger) stacks (while it's downright rare to see similar failures in the current version) |
(top is retry rewrite, bottom is mine) |
Implemented httr::RETRY on branch: CI has not been kind to this implementation (which I'm legitimately surprised by, since "it ran on my machine"). Notably, the tests are failing on different steps -- the code essentially "works", just is incredibly flaky: Even ignoring the test suite failures, it's worth noting the time difference between the partial test suite runs with httr::RETRY versus without. I pushed a quick commit to reviewer_comments in order to get closer comparisons for the timing (adjust for server load etc) -- while it feels rude to benchmark someone else's public API, I'm fine with engineering a "natural experiment" :) The timings below only reflect R CMD check, which isn't cached between builds.
I run the same backoff protocol as httr does, so it shouldn't be related to that. I'm pretty sure that part of the reason for both the additional failures and the increased run time is that get_href is solving for both res and body -- the two combined get 15 tries, as if the first stage fails there's no point in advancing to the second. That said, you still see a significant time hit just by changing the last GET to RETRY (which really should be an in-place substitution) so 🤷 I honestly don't know. I'm going to stick with the thing that works. |
The text was updated successfully, but these errors were encountered: