Meteors and singularity produce unbearable amounts of lag
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Meteors and singularity produce unbearable amounts of lag
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.
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.
-
- Joined: Fri May 23, 2014 3:29 am
- Byond Username: Amelius
Re: Meteors and singularity produce unbearable amounts of la
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.
The result is that we're almost worse off than we were before.
-
- 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
It's being worked on.
- MisterPerson
- Board Moderator
- Joined: Tue Apr 15, 2014 4:26 pm
- Byond Username: MisterPerson
Re: Meteors and singularity produce unbearable amounts of la
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
Feedback is dumb and it doesn't matter
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Meteors and singularity produce unbearable amounts of la
Not really sure this is true, the destruction of tiles themselves seems to also generate a lot of lag.MisterPerson wrote:It's mostly fastmos.
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.
- 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
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.
-
- Joined: Sat Apr 19, 2014 11:23 am
- Byond Username: Miauw62
Re: Meteors and singularity produce unbearable amounts of la
MORE DESTRUCTIONLuke 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.
<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
- Jacquerel
- Code Maintainer
- Joined: Thu Apr 24, 2014 8:10 pm
- Byond Username: Becquerel
Re: Meteors and singularity produce unbearable amounts of la
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.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.
- MisterPerson
- Board Moderator
- Joined: Tue Apr 15, 2014 4:26 pm
- Byond Username: MisterPerson
Re: Meteors and singularity produce unbearable amounts of la
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.CPTANT wrote:Not really sure this is true, the destruction of tiles themselves seems to also generate a lot of lag.MisterPerson wrote:It's mostly fastmos.
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
Feedback is dumb and it doesn't matter
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Meteors and singularity produce unbearable amounts of la
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
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.
- MisterPerson
- Board Moderator
- Joined: Tue Apr 15, 2014 4:26 pm
- Byond Username: MisterPerson
Re: Meteors and singularity produce unbearable amounts of la
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
Feedback is dumb and it doesn't matter
- 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
Pipenets, Powernets and atmos processing are all heavily impacted by the singularity destroying the station.
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 atmosLuke 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.
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Meteors and singularity produce unbearable amounts of la
Can't we sacrifice some atmos accuracy for speed?oranges wrote:Pipenets, Powernets and atmos processing are all heavily impacted by the singularity destroying the station.
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 atmosLuke 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.
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.
-
- TGMC Administrator
- Joined: Mon Apr 28, 2014 4:40 am
- Byond Username: Lumipharon
Re: Meteors and singularity produce unbearable amounts of la
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.
ie: If singulo is eating station, it slows down?
Laguloth is fun for no one.
-
- Joined: Thu Feb 05, 2015 8:51 am
- Byond Username: Actionb
Re: Meteors and singularity produce unbearable amounts of la
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.
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.
-
- Joined: Sat Apr 19, 2014 11:23 am
- Byond Username: Miauw62
Re: Meteors and singularity produce unbearable amounts of la
some subsystems, including atmos, already slow down if there is a large amount of lag.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.
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
- MisterPerson
- Board Moderator
- Joined: Tue Apr 15, 2014 4:26 pm
- Byond Username: MisterPerson
Re: Meteors and singularity produce unbearable amounts of la
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.
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
Feedback is dumb and it doesn't matter
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Meteors and singularity produce unbearable amounts of la
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?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.
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.
- 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
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.
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.
私は完璧
- 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
and more importantly
the singularity keeps retriggering the calculations, over and over
the singularity keeps retriggering the calculations, over and over
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Meteors and singularity produce unbearable amounts of la
How often does the atmos update in pipes? iIf you redraw before updating atmos it should be ok.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.
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.
-
- Joined: Sat Apr 19, 2014 11:23 am
- Byond Username: Miauw62
Re: Meteors and singularity produce unbearable amounts of la
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
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Meteors and singularity produce unbearable amounts of la
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.)
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.
- Aranclanos
- Joined: Tue Apr 15, 2014 4:55 pm
- Byond Username: Aranclanos
Re: Meteors and singularity produce unbearable amounts of la
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.
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.
I accept donations, click here
- CPTANT
- Joined: Mon May 04, 2015 1:31 pm
- Byond Username: CPTANT
Re: Meteors and singularity produce unbearable amounts of la
What is the PR that fixed this?
edit: nevermind, got it
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.
- Aranclanos
- Joined: Tue Apr 15, 2014 4:55 pm
- Byond Username: Aranclanos
Re: Meteors and singularity produce unbearable amounts of la
This was my revamp:
https://github.com/tgstation/-tg-station/pull/5638
This was the un-fuck up:
https://github.com/tgstation/-tg-station/pull/10864
https://github.com/tgstation/-tg-station/pull/5638
This was the un-fuck up:
https://github.com/tgstation/-tg-station/pull/10864
I accept donations, click here
Who is online
Users browsing this forum: madsenanders