-
Notifications
You must be signed in to change notification settings - Fork 957
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
async callback with highest performance? #1037
Comments
I looked at the CPR code and found that it uses a thread pool and poll implementation, which seems to occupy one thread per request. The thread pool has a minimum thread count of 1 and a maximum thread count equal to the number of CPU cores. If the CPU has 'n' cores, then the requests appear to be executed in groups of 'n'.
|
i want to find a library with epoll implementation with a eventloop, but can not find a light-weight one |
Description
I want to handle http get requests in async callback method.
In my ideal imagaition, it will cost one get request latency. (because i think in best siution, it should be parallelled executed).
but the test code seems cost a serialized time, which it's equal with send requests one by one.
could you help on this? how can i achieve the best performance with blocking?
Example/How to Reproduce
the first request got its return in 145ms, but the last cost 7800ms.
and one more try:
Possible Fix
the right interface function or set correctly.
Where did you get it from?
GitHub (branch e.g. master)
Additional Context/Your Environment
The text was updated successfully, but these errors were encountered: