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

Why is curl_echo() slow sometimes #325

Closed
jeroen opened this issue Nov 24, 2023 · 2 comments
Closed

Why is curl_echo() slow sometimes #325

jeroen opened this issue Nov 24, 2023 · 2 comments

Comments

@jeroen
Copy link
Owner

jeroen commented Nov 24, 2023

The timings of tests of e.g. http2 are 10x slower on Windows and Linux than MacOS: https://cran.r-project.org/web/checks/check_results_httr2.html

I suspect this may be related to: #324: because curl_echo uses the same default port every time, this may cause problems if several packages are checked concurrently (as is the case on cran win/linux) but also maybe a subsequent call will be delayed because the port remains in TIME_WAIT state.

cc @hadley

jeroen added a commit that referenced this issue Nov 24, 2023
@jeroen
Copy link
Owner Author

jeroen commented Dec 7, 2023

I think the delays are caused by httpuv/later, which again may be waiting for the R event loop?

When I first implemented curl_echo, the httpuv::startServer would start a normal server in the foreground. However later versions of httpuv have removed this feature, and now always run a daemonizedServer in the background using later. For me the delays seem to disappear if I downgrade httpuv all the way to 1.3.5, which still had the foreground server.

@jeroen
Copy link
Owner Author

jeroen commented Dec 7, 2023

Moving to #327

@jeroen jeroen closed this as completed Dec 7, 2023
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

1 participant