Meteors and singularity produce unbearable amounts of lag

For feedback on the game code and design. Feedback on server rules and playstyle belong in Policy Discussion.
Post Reply
User avatar
CPTANT
Joined: Mon May 04, 2015 1:31 pm
Byond Username: CPTANT

Meteors and singularity produce unbearable amounts of lag

Post by CPTANT » #108230

Both sing and meteors cause so much lag that the round basically becomes unbearable.


No feature is worth this amount of game destroying lag.

Features that produce this amount of lag should either be removed or put on inactive until the lag they produce becomes tolerable again.
Timberpoes wrote: Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
Amelius
Joined: Fri May 23, 2014 3:29 am
Byond Username: Amelius

Re: Meteors and singularity produce unbearable amounts of la

Post by Amelius » #108231

There was a shortish period of time, around a few months, wherein the singularity hardly caused lag. I believe the server was upgraded, wherein coderbus believed the server could take more punishment, and introduced fastmos, singuloth changes (I'm not privy to the details, but I believe it had something to do with object collisions) and object collision from explosives.

The result is that we're almost worse off than we were before.
Scott
Github User
Joined: Fri Apr 18, 2014 1:50 pm
Byond Username: Xxnoob
Github Username: xxalpha

Re: Meteors and singularity produce unbearable amounts of la

Post by Scott » #108232

It's being worked on.
User avatar
MisterPerson
Board Moderator
Joined: Tue Apr 15, 2014 4:26 pm
Byond Username: MisterPerson

Re: Meteors and singularity produce unbearable amounts of la

Post by MisterPerson » #108355

It's mostly fastmos.
I code for the code project and moderate the code sections of the forums.

Feedback is dumb and it doesn't matter
User avatar
CPTANT
Joined: Mon May 04, 2015 1:31 pm
Byond Username: CPTANT

Re: Meteors and singularity produce unbearable amounts of la

Post by CPTANT » #108400

MisterPerson wrote:It's mostly fastmos.
Not really sure this is true, the destruction of tiles themselves seems to also generate a lot of lag.
Timberpoes wrote: Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
User avatar
Luke Cox
Joined: Sat Dec 06, 2014 8:52 am
Byond Username: NocturnalQuill
Location: Prisoner Transfer Room

Re: Meteors and singularity produce unbearable amounts of la

Post by Luke Cox » #108409

Singulo was fine for quite some time. Just revert it to how it worked back then. I don't know why codebus felt the need to mess with something that worked perfectly fine.
Image
Miauw
Joined: Sat Apr 19, 2014 11:23 am
Byond Username: Miauw62

Re: Meteors and singularity produce unbearable amounts of la

Post by Miauw » #108445

Luke Cox wrote:Singulo was fine for quite some time. Just revert it to how it worked back then. I don't know why codebus felt the need to mess with something that worked perfectly fine.
MORE DESTRUCTION
<wb> For one, the spaghetti is killing me. It's everywhere in food code, and makes it harder to clean those up.
<Tobba> I stared into BYOND and it farted
User avatar
Jacquerel
Code Maintainer
Joined: Thu Apr 24, 2014 8:10 pm
Byond Username: Becquerel

Re: Meteors and singularity produce unbearable amounts of la

Post by Jacquerel » #108447

Luke Cox wrote:Singulo was fine for quite some time. Just revert it to how it worked back then. I don't know why codebus felt the need to mess with something that worked perfectly fine.
I think it was actually changes to other systems that weren't then singularity tested which broke the singularity, the singularity itself hasn't really changed much so there's no state to "revert" it to.
User avatar
MisterPerson
Board Moderator
Joined: Tue Apr 15, 2014 4:26 pm
Byond Username: MisterPerson

Re: Meteors and singularity produce unbearable amounts of la

Post by MisterPerson » #108462

CPTANT wrote:
MisterPerson wrote:It's mostly fastmos.
Not really sure this is true, the destruction of tiles themselves seems to also generate a lot of lag.
Yeah but that lag is either a single 1-time hit or a series of 1-time hits. Fastmos is ongoing from the explosion/singulo release until forever. And trust me when I say that fastmos is freaking expensive when the singulo is out. Like REALLY expensive.

Not that I'm trying to downplay the deletion stuff though, but that's going to be expensive no matter what frankly.
I code for the code project and moderate the code sections of the forums.

Feedback is dumb and it doesn't matter
User avatar
CPTANT
Joined: Mon May 04, 2015 1:31 pm
Byond Username: CPTANT

Re: Meteors and singularity produce unbearable amounts of la

Post by CPTANT » #108487

Ok I did some local testing for the singularity and meteors.

Effects of tearing a singularity through the station:

atmos time required- jumped from 0.3 ds to around 1ds

tearing through parts without cables or pipes

object time required jumps to around 0.6ds

tearing through area's with cables

object time jumps to around 4ds

It wasnt that great of a test, but I suspect recreating the power grid for some reason costs huge amount of time, this seems to be responsible for the large peaks of lag experienced when the sing is loose, atmos slows down the game in general by a fair bit and the throwing/destruction of tiles also requires a significant amount of time.




Meteors lagged virtually completely through atmos, required time jumped from 0.3 to around 1.2ds
Timberpoes wrote: Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
User avatar
MisterPerson
Board Moderator
Joined: Tue Apr 15, 2014 4:26 pm
Byond Username: MisterPerson

Re: Meteors and singularity produce unbearable amounts of la

Post by MisterPerson » #108510

Oh yeah you're right, I forgot about the damn powernets and pipenets. Yes, those are also going to be awful.
I code for the code project and moderate the code sections of the forums.

Feedback is dumb and it doesn't matter
User avatar
oranges
Code Maintainer
Joined: Tue Apr 15, 2014 9:16 pm
Byond Username: Optimumtact
Github Username: optimumtact
Location: #CHATSHITGETBANGED

Re: Meteors and singularity produce unbearable amounts of la

Post by oranges » #108875

Pipenets, Powernets and atmos processing are all heavily impacted by the singularity destroying the station.
Luke Cox wrote:Singulo was fine for quite some time. Just revert it to how it worked back then. I don't know why codebus felt the need to mess with something that worked perfectly fine.
It's not changes to the singularity, it's changes to other systems, especially the faster atmos and I don't think most people want to go back to the old super slow super irrelevant atmos
User avatar
CPTANT
Joined: Mon May 04, 2015 1:31 pm
Byond Username: CPTANT

Re: Meteors and singularity produce unbearable amounts of la

Post by CPTANT » #108878

oranges wrote:Pipenets, Powernets and atmos processing are all heavily impacted by the singularity destroying the station.
Luke Cox wrote:Singulo was fine for quite some time. Just revert it to how it worked back then. I don't know why codebus felt the need to mess with something that worked perfectly fine.
It's not changes to the singularity, it's changes to other systems, especially the faster atmos and I don't think most people want to go back to the old super slow super irrelevant atmos
Can't we sacrifice some atmos accuracy for speed?
Timberpoes wrote: Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
lumipharon
TGMC Administrator
Joined: Mon Apr 28, 2014 4:40 am
Byond Username: Lumipharon

Re: Meteors and singularity produce unbearable amounts of la

Post by lumipharon » #108893

I know admins can adjust atmos speed on the fly - could you make atmos speed dynamic?
ie: If singulo is eating station, it slows down?

Laguloth is fun for no one.
Actionb
Joined: Thu Feb 05, 2015 8:51 am
Byond Username: Actionb

Re: Meteors and singularity produce unbearable amounts of la

Post by Actionb » #108988

Talking out of my plebian ass with no coding knowledge and without a real clue of mechanics behind the game here:
Is there any reason for the powernet to be so precise? I mean, what would be lost if the powernet updated less frequently?
I can understand why piping (gotta flood fast) and lighting needs to be processed right away - but power?

Also I like lumi's idea of atmos slowing down/becoming less precise the more it has to calculate, instead of slowing down the game itself.
Miauw
Joined: Sat Apr 19, 2014 11:23 am
Byond Username: Miauw62

Re: Meteors and singularity produce unbearable amounts of la

Post by Miauw » #108995

lumipharon wrote:I know admins can adjust atmos speed on the fly - could you make atmos speed dynamic?
ie: If singulo is eating station, it slows down?

Laguloth is fun for no one.
some subsystems, including atmos, already slow down if there is a large amount of lag.

also iirc atmos is calculated on a tile by tile basis, you cant just make it "less precise"
<wb> For one, the spaghetti is killing me. It's everywhere in food code, and makes it harder to clean those up.
<Tobba> I stared into BYOND and it farted
User avatar
MisterPerson
Board Moderator
Joined: Tue Apr 15, 2014 4:26 pm
Byond Username: MisterPerson

Re: Meteors and singularity produce unbearable amounts of la

Post by MisterPerson » #109007

The problem with power isn't the actual power calculations, which are somewhat infrequent and not terribly expensive.

The problem is when the singularity/bomb eats a wire/pipe, the entire network has to be recalculated from scratch.
I code for the code project and moderate the code sections of the forums.

Feedback is dumb and it doesn't matter
User avatar
CPTANT
Joined: Mon May 04, 2015 1:31 pm
Byond Username: CPTANT

Re: Meteors and singularity produce unbearable amounts of la

Post by CPTANT » #109114

MisterPerson wrote:The problem with power isn't the actual power calculations, which are somewhat infrequent and not terribly expensive.

The problem is when the singularity/bomb eats a wire/pipe, the entire network has to be recalculated from scratch.
Would it be possible to not update the pipe network the instant every time a pipe is destroyed but rather calculate a new network at fixed intervals so the network doesn't has to be rebuild 10 times but rather 1 time when a singularity rips through the pipes?

Or is this already the case?
Timberpoes wrote: Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
User avatar
Remie Richards
Joined: Thu Apr 17, 2014 7:11 pm
Byond Username: CrimsonVision
Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
Contact:

Re: Meteors and singularity produce unbearable amounts of la

Post by Remie Richards » #109115

That would cause the network to be incorrect CPTANT.
every time a pipe is destroyed the network would be incorrect until the next scheduled redraw of the network.
an incorrect network means gases trying to flow through non existent pipes, which will cause other weirdness.
私は完璧
User avatar
oranges
Code Maintainer
Joined: Tue Apr 15, 2014 9:16 pm
Byond Username: Optimumtact
Github Username: optimumtact
Location: #CHATSHITGETBANGED

Re: Meteors and singularity produce unbearable amounts of la

Post by oranges » #109116

and more importantly

the singularity keeps retriggering the calculations, over and over
User avatar
CPTANT
Joined: Mon May 04, 2015 1:31 pm
Byond Username: CPTANT

Re: Meteors and singularity produce unbearable amounts of la

Post by CPTANT » #109119

Remie Richards wrote:That would cause the network to be incorrect CPTANT.
every time a pipe is destroyed the network would be incorrect until the next scheduled redraw of the network.
an incorrect network means gases trying to flow through non existent pipes, which will cause other weirdness.
How often does the atmos update in pipes? iIf you redraw before updating atmos it should be ok.

It would still update often in that case but if you can cut it down from every time a pipe is destroyed to every frame a pipe is destroyed in it might already be a significant change.

But I don't really know how network updates and atmos updates are currently handled in the system.
Timberpoes wrote: Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
Miauw
Joined: Sat Apr 19, 2014 11:23 am
Byond Username: Miauw62

Re: Meteors and singularity produce unbearable amounts of la

Post by Miauw » #109665

yeah we could just have breaking a pipe schedule the network to be redrawn on the next tick before atmos processes.
<wb> For one, the spaghetti is killing me. It's everywhere in food code, and makes it harder to clean those up.
<Tobba> I stared into BYOND and it farted
User avatar
CPTANT
Joined: Mon May 04, 2015 1:31 pm
Byond Username: CPTANT

Re: Meteors and singularity produce unbearable amounts of la

Post by CPTANT » #109669

Changing this sounds easy enough (at least if destruction triggers a COMPLETE redraw every time currently).

But I am very unfamiliar with tg code and I can't find the relevant files for this. (that looks like complete spaghetti to me without an overview of what files handle which aspect of the game.)
Timberpoes wrote: Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
User avatar
Aranclanos
Joined: Tue Apr 15, 2014 4:55 pm
Byond Username: Aranclanos

Re: Meteors and singularity produce unbearable amounts of la

Post by Aranclanos » #109671

READ THIS IF YOU WANT TO KNOW THE REASONS OF THE LAG


I'll try to go as simple as possible.

Most of the lag can be easily be blamed on byond's way to manually delete objects, it goes through all the other objects of the game looking for a reference to itself to set it to null, nothing. We know this because byond has a profiler tool where you can easily check this.
It's obvious that the singularity and meteors delete a lot of objects, but there's also a second way to remove objects from the game, the garbage collector. In simple words, if no other object is referencing the one that you're trying to delete, it deletes itself after some time without doing the loop looking for references. Nexis from /vg/ (I think?) made a cool controller that puts objects that you want to delete in a queue and removes all possible references who are expected (the expectations change from object to object). After some time, if the object wasn't removed by the garbage collector, its manually deleted (AKA LAG)
So when the singularity lags, it means that something it's failing to garbage collect (soft delete) and ends up being manually deleted (hard delete, lag)

Now, pipes failed to GC themselves because the pipenet system was a disaster, leaving references all over the place. I personally fixed this, revamping the whole thing (that's why you say that at some point it didn't lag)
Buuut some people touched it and it broke again, after some months and a lot of screaming the same people seem to have fixed it, hopefully. (like a week ago)
So yeah it should be fine now.

:faggot: :faggot: :faggot: :faggot: :faggot:
I accept donations, click here
User avatar
CPTANT
Joined: Mon May 04, 2015 1:31 pm
Byond Username: CPTANT

Re: Meteors and singularity produce unbearable amounts of la

Post by CPTANT » #109672

What is the PR that fixed this?

edit: nevermind, got it
Timberpoes wrote: Tue Feb 14, 2023 3:21 pm The rules exist to create the biggest possible chance of a cool shift of SS13. They don't exist to allow admins to create the most boring interpretation of SS13.
User avatar
Aranclanos
Joined: Tue Apr 15, 2014 4:55 pm
Byond Username: Aranclanos

Re: Meteors and singularity produce unbearable amounts of la

Post by Aranclanos » #109673

I accept donations, click here
Post Reply

Who is online

Users browsing this forum: No registered users