[Bug] Extreme building lag when finishing a component. [59783]
Dreadlord
Join Date: 2015-03-31 Member: 202815Members
Subnautica Version - 59783
Description - Lag that slowly builds up as you increase the base. Starts slowly and increases as your base continue to grow. I am up to 6-7 seconds on the freeze now.
This lag ONLY happens when you complete an item from 99% to 100% or when deconstructing from 100% to 99%
Exception: If you build anything from the external menu, like a solar panel or thermal reactor, there is NO lag spike.
Also, lag spike ONLY happens when building an object from 99% to 100%. There is no lag in the game otherwise at all.
I can start on an object and construct and deconstruct as much as I like without any lag. Going from 99% to 100% and the spike will hit.
Added: As I finished a reinforcement on a corridor I could see the seamoth despawn and respawn as the clamps grabbed hold of it and raise it up again. Not sure if this has anything to do with the problem, but having at least 3-4 moonpools over different distances away but still part of the same base could explain why this "update routine" takes longer and longer time?! If it is part of the problem this "update routine" will need some optimization.
Reproduction steps - Build a large base and watch how the time to finish a component increases.
Pictures or Video - https://clips.twitch.tv/BeautifulGiftedMooseDoritosChip (if you need a better video recorded that describes all of this, let me know)
Image of the time graph option when finishing the build: https://imgur.com/a/AyrwF
Description - Lag that slowly builds up as you increase the base. Starts slowly and increases as your base continue to grow. I am up to 6-7 seconds on the freeze now.
This lag ONLY happens when you complete an item from 99% to 100% or when deconstructing from 100% to 99%
Exception: If you build anything from the external menu, like a solar panel or thermal reactor, there is NO lag spike.
Also, lag spike ONLY happens when building an object from 99% to 100%. There is no lag in the game otherwise at all.
I can start on an object and construct and deconstruct as much as I like without any lag. Going from 99% to 100% and the spike will hit.
Added: As I finished a reinforcement on a corridor I could see the seamoth despawn and respawn as the clamps grabbed hold of it and raise it up again. Not sure if this has anything to do with the problem, but having at least 3-4 moonpools over different distances away but still part of the same base could explain why this "update routine" takes longer and longer time?! If it is part of the problem this "update routine" will need some optimization.
Reproduction steps - Build a large base and watch how the time to finish a component increases.
Pictures or Video - https://clips.twitch.tv/BeautifulGiftedMooseDoritosChip (if you need a better video recorded that describes all of this, let me know)
Image of the time graph option when finishing the build: https://imgur.com/a/AyrwF
Comments
By doing this we can look at the game in our internal editor and try to figure out what's going on. Thanks
Thank you for taking a look at this, as it is driving me nuts and stopping me from playing atm.
You can find my save file here:
https://drive.google.com/open?id=1wHxoqVZx2_gTZ4YIRQNW7r16vbzKN2Hr
Basically just try to deconstruct or construct anything.
If you need any additional information I will be available.
Every game I play, this also happens if my base get anywhere larger than some 10 modules. Is there anything we can do to prevent this from happening?
Just for fun I was building a tunnel across the whole map but as I approached 1Km the hang up for each component was over 10 seconds so I gave up.
It was on Freedom with "nocost" so the base had valid structural integrity and energy.
I can't promise a fix, but we'll take a look. Thanks for the upload.
Taking a look is good enough for me. Hope it is a easy to locate the bug with the info I have provided. I am available for testing and/or if you need more info.
--
Sath
When a habitat piece is added or removed the game updates the data about the new or removed piece, then it deletes all habitat pieces in the entire world and recreates everything from the updated data. Each time this is done the games goes through a number or large and costly computations, such as, rebuilding the flood groups, hull integrity groups, and power groups. Additional work is done for each of the more complicated pieces, such as Scanner Rooms and Moonpools.
Again, this is done for every habitat, every piece, in the entire game world, regardless of where or to what the new or removed piece actually connects!
O.o How do you know this?
Also, I was motivated to find out why.
I love Subnautica, I can't get enough of it! I have a game with many small bases; simple three piece habitats with a Scanner Room and some way to power it. I have three "main" bases that are much larger. It's all completely unnecessary. I've finished the game so I decided to use Scanner Rooms to reveal 100% of the world, to make sure I haven't missed a thing.
At the moment, my game freezes for ~12 seconds when modifying a habitat; I've been forced to halt my endeavor, it is too painful to continue.
BTW, Your signature is absolutely awesome! All the links!
Yeah the save was for the devs to test and find out stuff.
That is as much as I though. You can actually see if if you build something in the corridor and you see the moonpool. If the moonpool has a seamoth in it, you can see it despawn and re-spawn (indicating that the room is rebuildt) for each time an object is moving from finished state to unfinished or the other way around.
Experimental Changes note that is probably related:
59892 /main 2018-02-14 17:20:18 Igor Popov Reduced hitching when rebuilding a base
If that is true, as a computer analyst I have to say that is probably one of the worst pieces of code I have seen in a while .... I always wondered how bad the code should be to hang so much on an i7 just to add a component to a list and add/subtract hull integrity and update possible list of flooded floors and/or energy surplus, but rebuilding the entire game is ... well, like you said, let's leave at that.
Another bug i noticed is when you make your base bigger the newer buildings have stilts, your older buildings the stilts retract and go away making the base look silly...
I have 16gb of ram, I7 4790k an SSD and a r9-290 tri-x...
Why is everything resetting when you build something ? Like someone said above i guess its the code of the game.. im not a code writer at all.. but even i noticed everything resets itself when you build or remove something..
This is a really cool game, and ive spent 10s of hours just building my base but it seems like there is a limit to how big you can make it.. And mine isnt really that big so this is kinda a bummer.. I have two moonbays, 5 general purpose buildings, and the rest are just corridors.
Its 2018 not 2001 where things should be limited.. With how powerfull computers are being 4-8-16 cores and howe much memory we have youre buildings shouldnt be limited to say 50 stilts and then dissapear when you build something new
I thought it was because i expanded too big.. but i built a general purpose building away as a guinea pig a few feet away from my base, as the building completed the game did its stutter at the last 1% and my stilts extended. I then added a new building connected to my base and as the 1% stutter came my stilts well some disspeared again.. So then i started to deconstruct my guinea pig building and the 1% stutter came.. and the stilts extended back down.
@Caiobrz if you want to look at some of the code, head over to the Modding Discord and they can probably help you access it. IIRC it's C#
can u maybe take pictures of this mega build? i had\have the same idea that i wanna build all the way down to, or atleast a long way down towards the "end portal"..
PLEASE PLEASE PLEASE TELL US or I will do nothing but switch to Xbox but it is TOO MUCH MONEY!
so please tell us the planned release date for subnautica on the Xbox.
I've also experienced this. I thought it'd be neat to continued IGP's endeavor of building a base at the bottom of the void. I did it, but omg it was painful. I got to the point where not only did I get a gave freeze of 15-20 seconds for every piece of base structure (modules, reinforcements, anything that changes the bases "structure") but also PLACING pieces became a slideshow of around .05 fps. (And no, that's not just a guess. That's based upon the fact that it took me ~20s from the point that I clicked a module piece like a hallway to when the frame would update.)
I wasn't likening the issue itself to an infinite an infinite loop. More to the knowledge your code could create one but not doing anything about it until there's an issue/someone complains.
The devs must've known that this would be a potential issue with that design methodology. People have been creating crazy big bases for quite some time. It's gonna come back & bite them, it was just a matter of time.
Nice to know. Any word on when this will be patched out to live branch?
Also, will it work on existing save games?
If so, will it be part of next update?
I would love to keep on playing and streaming, but with more than 7 secs of freeze every time I do anything on the base, it is neither playable nor streamable.
This is happening because the base mechanics load the interior as a separate model. This is how they're all connecting. This creates lag on lower end PCs due to the swap of models, which can lag like hell on PCs with a lower end graphics card and CPU.
As for fixes, I cannot help.
Well if that was the case I wouldn't really have any issues. I have a strong pc that should not have any issues with running this game at all.
Also if you read my original post you would see that I have no issues what so ever with anything except when I construct or deconstruct something.
pc specs:
Processor: Intel(R) Core(TM) i7-7800X CPU @ 3.50GHz (12 CPUs), ~3.5GHz
Memory: 32768MB RAM
gfx Chip type: GeForce GTX 1080 Ti