-
Notifications
You must be signed in to change notification settings - Fork 84
Reuse TCP connection / keep-alive #210
Comments
I figured out the problem. The cli is using I'd like to fix this by extending the Are you open for PRs, @alanhamlett ? |
Would that singleton be shared across multiple Python processes? |
Yes, for sure. However we're also working on porting this Python code into Go so it might be better worth the time to fix it in the new repo: https://github.com/wakatime/wakatime-cli |
That's a good point. If I think about it, my above mentioned approach would only help to reuse the connection across multiple calls to
Very cool! I assume the new version is going to be a cli as well? An alternative would be to have a long-running daemon process that listens on local TCP/IP connections or so. But that would require to adapt all plugins and probably comes with some disadvantages on its own. |
What has happened to |
It's private now because we're not ready and still redesign the entire cli. Will reopen as soon as possible. |
I might be totally wrong, but to me it seems like Wakatime does not reuse an existing TCP connection in consecutive requests. Take a look at this Wireshark screenshot.
What you can see is three consecutive requests (I changed tabs in VSCode three times) and apparently, new TCP- and TLS handshakes are performed each time.
Please correct me if I got something wrong. But if not, wouldn't it be worth to reuse the connection for efficiency?
The text was updated successfully, but these errors were encountered: