jinxOAO / DSPmod_MoreMegaStructures

Add more megastructures.
6 stars 2 forks source link

More mega structures adversily affects fps by 20 percent (Fixed) #31

Open Cdeeks opened 6 months ago

Cdeeks commented 6 months ago

i have noticed that just having this mod enabled and not even having items or structures down takes just over 20 percent performance down and its relly annoying. is there a way to fix this? i relly want to use this mod.

jinxOAO commented 6 months ago

You mean like even if starting a new game without doing anything may take over 20%? Or you mean a game save at about mid/late stage with some dyson spheres, only not producing the new items? I also want to know if you have gs2 installed and how many stars in your game. I can't guarantee that this will be improved, but I'll try and see what I can do.

Cdeeks commented 6 months ago

Hi, sorry I should have mentioned I am using GS2 and a few other small mods like QOL mods. I have about 390 stars in my universe and it lagged since very start of game . I'm currently 40 hrs into game but I did not have a clue what was causing lag to I decided to test each mod individually.

It's definitely a huge noticeable problem as I have been playing last few hrs with mod disabled and the fps counter does not show on top left and it runs so smooth.

When MS is on it runs at 29 fps Green number and blue cpu number is about 40 to 45 . I literally have 0 items in game world from this mod so it's hogging a ton of cpu power simply just by being an active mod. I'm gutted I love this mod 😢. But I can't play with this frame drop as it feels horrible.

I did mention it in mod discord to see if anyone else has issues. Thanks for fast reply and I hope my info helps u get to bottom of issue.

Cdeeks commented 6 months ago

If u need logs or a copy of my mod list or save file I'll be happy to provide them 😊

starfi5h commented 6 months ago

Here is my testing result. The left is GS with 384 stars. The right is GS + MMS image As the image shows, the statistics part increase by 5.5ms

jinxOAO commented 6 months ago

Thank you two for helping me to locate the problem. It is caused by the unnecessary FactoryProductionStat.PrepareTick() and FactoryProductionStat.GameTick() whose bounded megastructure has not been set to interstellar aseembly. I've upload a new version and this should partly fix that problem (the statistics cost drops from 0.66ms to 0.04ms on my PC with 64 stars, while without MMS it was 0.03ms). As for the fps, if it is caused by ups lag, it should also be improved. In my test, a new game with 380+ stars will have only ~5% CPU performance down with MMS now.

Cdeeks commented 6 months ago

Much better performance now using the mod. thank you so much for fast response :)

Cdeeks commented 6 months ago

Hi sorry to revive this same issue, today i logged back into my game no MMS items plkaced still and it seems the same issue is back again.

jinxOAO commented 6 months ago

Could you send your performace panel's screenshot with the major gap part? (with and without MMS, like starfi5h did). I want to know which part is causing this problem.

Cdeeks commented 6 months ago

NO MMS WITH MMS

So the lower one is with no mms on.

Cdeeks commented 6 months ago

image And to get good logig i have to sacrifice fps green numbers. worse when in combat to.

jinxOAO commented 6 months ago

And I want to know what did you do after yesterday's fix? What changed in your game save? Besides, I really don't know how the physics part's cost is increasing. I have no clue about that. ok my bad, the universe simulating is the main reason, I'll see what I can do.

jinxOAO commented 6 months ago

Oh I have to ask, are you firing the star cannon? This costs a lot.

Cdeeks commented 6 months ago

No star cannon i have zero production of any items from this mod as i am holding off on using it in this save atm to see if the issue resolves. the only change in my game from yesterday is i am now launching dyson sails and dyson shells and i have my dyson sphere about 50 percent complete and it outputs 9gw. with mms bottom with mms top

Cdeeks commented 6 months ago

enemy units and draw call are totaling 5.6ms is this normal?