-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Description: Due to the way how the HN API is constructed the retrieval of comments using the get_comments
function is slow. It was sped up by using the future.apply
package, but an alternative would be making a group of asynchronous requests.
Currently httr does not support async requests link
There are other libraries that provide support for async requests:
curl
crul
The goal is to check whether asynchronous requests would be faster than using future.apply, if so the target library for making http requests needs to be selected. This is a pretty significant decision as it will probably result in a rewrite of tests that use httptest
which is tightly integrated with httr
.
Moreover, switching to asynchronous requests would allow to reduce the amount of dependencies as future.apply
will not be needed anymore.
Acceptance criteria:
- Benchmarks on whether asynchronous requests speed up the
get_comments
function - Depending on the results define next steps in form of issues