Skip to content

[516] Reduces stuttering issues for 516 users #29078

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

Merged
merged 6 commits into from
May 1, 2025

Conversation

Burzah
Copy link
Member

@Burzah Burzah commented Apr 21, 2025

What Does This PR Do

Increases the amount of time users save messages to storage. 10 -> 60 seconds
Decreases the max persisted messages. 1000 -> 500

Disabled persistant chat messages by default. A checkbox was added into the general setting of the tg chat window. This means that chat persisted messages are now off by default (chat does not remain in the window when you disconnect and reconnect).

Why It's Good For The Game

Fix to help reduce client lag when using 516.

Testing

Live testing has reported users with previous stuttering issues eliminated or reduced.

Tested chat persistence on live by disconnecting and reconnecting to the server.
Chat was no longer saved in the window after reconnecting.

Declaration

  • I confirm that I either do not require pre-approval for this PR, or I have obtained such approval and have included a screenshot to demonstrate this below.

Changelog

NPFC

@ParadiseSS13-Bot ParadiseSS13-Bot added Testmerge Requested This PR has a pending testmerge request -Status: Awaiting review This PR is awaiting review from the review team TGUI This PR modifies TGUI, will conflict Testmerge Active This PR is currently testmerged on production labels Apr 21, 2025
@Burzah
Copy link
Member Author

Burzah commented Apr 21, 2025

Multiple reports that this has reduced stuttering issues so far. We will look to see where we can make improvements and make a possible opt-out for local chat storage if need be.

@HMBGERDO
Copy link
Contributor

it is reduced tho its not gone, its just more rare than it was before
https://youtu.be/K-P0pgEfON0
you can see the stutter when the little fan stops moving, its almost a second

another example
https://youtu.be/vyuGg4Bq5Bk

and another
https://youtu.be/gzNsW6gKH84

it didnt happend every minute later on so maybe its somehow working bad when new messages being added when it happens or some other logic but it feels just awful

@HMBGERDO
Copy link
Contributor

when you first time open say box(basically trying to say anything) on 516, you write in the bottom right menu instead of say box
once you click TAB its fixed

@BAGELMENSK
Copy link

Also having trouble with chatboxes not properly initializing on 516, it may have been an older problem but sometimes I press t or o etc. and the box comes up but it doesnt tab over(EG no text cursor and any typign is not registered) possible that thats a prior or seperate problem

@BAGELMENSK
Copy link

Yeah the movement input lock is not fixed afai can tell

@HMBGERDO
Copy link
Contributor

okay uh. Update on stuttering issue
I've been testing it locally, tried changing some variables, it didnt help me, i went afk for a couple hours, PC went to sleep, i came back and... its just gone?
yes, i did clean byond cache during tests and it didnt help
probably some other cache fucks up with new data from 516 client and it causes stuttering? I will comment here again if it'll come back but right now it looks fine after PC slept for a couple hours
so, i would suggest everyone suffering from stuttering on 516 to reboot the PC and then try to play

also, changes in this PR doesnt affect the issue, its not because we had too many messages or it was send too often, it was something fucking with something i guess

if that'd help anyone researching this issue, i figured out it only stutters if some specific message is the last one(in my example if the last message was examine text, it didnt stutter and if it was putting something in a storage, it was stuttering), for testing i set MAX_PERSISTED_MESSAGES to 5000 and MESSAGE_SAVE_INTERVAL to 1000(1 second)

@Burzah
Copy link
Member Author

Burzah commented Apr 22, 2025

it is reduced tho its not gone, its just more rare than it was before https://youtu.be/K-P0pgEfON0 you can see the stutter when the little fan stops moving, its almost a second

another example https://youtu.be/vyuGg4Bq5Bk

and another https://youtu.be/gzNsW6gKH84

it didnt happend every minute later on so maybe its somehow working bad when new messages being added when it happens or some other logic but it feels just awful

It is a fix that needs to be adjusted, it isn't perfect but I will be trying to refine it a bit more.

when you first time open say box(basically trying to say anything) on 516, you write in the bottom right menu instead of say box once you click TAB its fixed

This is just a stutter fix, there will be a fix for this, but we are in the middle of upgrading to tgui v6, so a lot of the issues will be fixed when that is complete.

Also having trouble with chatboxes not properly initializing on 516, it may have been an older problem but sometimes I press t or o etc. and the box comes up but it doesnt tab over(EG no text cursor and any typign is not registered) possible that thats a prior or seperate problem

As said, this is just a stuttering fix. There is a plan to fix this one, but it won't be apart of this PR as we need to do some additional prep work for that.

Yeah the movement input lock is not fixed afai can tell

This is just a trial for fixing the majority of people's stutter issues (if they were experiencing any). Other fixes will be in other pull requests when they are ready to be deployed. We have a thread in coding chat that is for discussing the current issues and what is being tackled. Most of the issues brought up are known, but they require more work or bigger refactors. We are currently upgrading to tgui v6, which will solve some of the problems and make it easier to port some fixes that all the major codebases are using.

okay uh. Update on stuttering issue I've been testing it locally, tried changing some variables, it didnt help me, i went afk for a couple hours, PC went to sleep, i came back and... its just gone? yes, i did clean byond cache during tests and it didnt help probably some other cache fucks up with new data from 516 client and it causes stuttering? I will comment here again if it'll come back but right now it looks fine after PC slept for a couple hours so, i would suggest everyone suffering from stuttering on 516 to reboot the PC and then try to play

also, changes in this PR doesnt affect the issue, its not because we had too many messages or it was send too often, it was something fucking with something i guess

if that'd help anyone researching this issue, i figured out it only stutters if some specific message is the last one(in my example if the last message was examine text, it didnt stutter and if it was putting something in a storage, it was stuttering), for testing i set MAX_PERSISTED_MESSAGES to 5000 and MESSAGE_SAVE_INTERVAL to 1000(1 second)

Yes. It will only save messages sent by players at this point. It does not save things like examine or similar. The trick will be refining what we are already testing right now, and or introducing a way for players to turn off the local chat logging. I plan on working on this issue more going forward, so I will do the best to refine a solution.

I appreciate all the feedback given, thanks!

@BAGELMENSK
Copy link

with more experience, the stuttering is indeed gone but the movement inputs are still fucky

@Burzah
Copy link
Member Author

Burzah commented Apr 23, 2025

with more experience, the stuttering is indeed gone but the movement inputs are still fucky

Yeah that won't be going away with this PR, but it is planned for a future fix as we move closer to some refactoring and additional backend changes.

@HMBGERDO
Copy link
Contributor

if you click on the chat tab and then press say button, first press is ignored, i need to press T twice :(

@Burzah
Copy link
Member Author

Burzah commented Apr 26, 2025

if you click on the chat tab and then press say button, first press is ignored, i need to press T twice :(

Known issue. We hope to fix it moving forward with tgui v6.

@Burzah Burzah changed the title [516] Possible stuttering fix for 516 users [516] Reduces stuttering issues for 516 users Apr 28, 2025
@chuga-git chuga-git added this pull request to the merge queue May 1, 2025
Merged via the queue into ParadiseSS13:master with commit cc25e64 May 1, 2025
19 checks passed
Absolucy added a commit to Absolucy/Monkestation that referenced this pull request May 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Status: Awaiting review This PR is awaiting review from the review team Testmerge Active This PR is currently testmerged on production Testmerge Requested This PR has a pending testmerge request TGUI This PR modifies TGUI, will conflict
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants