Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Unreasonable amount of lag during handshake #166

Open
in1tiate opened this issue Mar 12, 2021 · 4 comments
Open

Unreasonable amount of lag during handshake #166

in1tiate opened this issue Mar 12, 2021 · 4 comments

Comments

@in1tiate
Copy link
Member

tsuserver3 has about 1-2 seconds of lag between the user clicking the server entry and the handshake completion, even on local servers. Contrast this with akashi, which completes the handshake near-instantly on a local connection, and it's clear something is severely hampering performance here.

@caleb-mabry
Copy link
Contributor

@in1tiate
Is the video I have attached the lag that you're talking about? I don't think that it's any huge problem. Seems pretty on-par with how long things usually take to load on the internet?

Attorney.Online.2.2021-04-18.18-36-10.mp4
        tic = time.perf_counter()
        c = self.client_manager.new_client(transport)
        c.server = self
        c.area = self.area_manager.default_area()
        c.area.new_client(c)
        toc = time.perf_counter()
        print(f"Time to response was {toc - tic:0.4f} seconds")

I've timed the above code to see what it was looking like for creating a new client when the user clicks on the server and got:
image

Which is well within the range of the general UI/UX response time.

Thoughts??

@in1tiate
Copy link
Member Author

The amount of lag is negligible when network latency is not a factor, however when it is a factor tsuserver can take upwards of 2 seconds to properly finish the handshake

@caleb-mabry
Copy link
Contributor

The way you're explaining this makes it seem like it's a network latency problem and nothing with TSU? If the handshake with no latency is ~0.0011 seconds and with network latency is more, that's not an issue with TSU, right?

@oldmud0
Copy link
Member

oldmud0 commented Apr 19, 2021

I don't remember which part of the handshake tends to take the longest, other than the initial TCP connection. Maybe look into the HDID/ban check.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants