CammiePone / Cammies-Minecart-Tweaks

Makes Minecarts a more viable option for transportation!
Other
22 stars 8 forks source link

Love this mod but it seems to be more performance heavy than all my other mods because of the following: #23

Closed Julian-MJK closed 1 year ago

Julian-MJK commented 2 years ago

Here's a screenshot from profiling with Spark: bilde In this test I didn't generate many new chunks so that's why the lighting engine and chunk loader take less resources, but this mod is still consistently the most performance heavy below Lithium because of the things in the screenshot above. And I haven't built any rail systems yet, there's one stray minecart and some empty track in the loaded chunks thats about it.

Any chance this can be improved somewhat? Maybe a config option for disabling the more performance heavy features?

CammiePone commented 2 years ago

The should slow down method is about as performant as it can probably get. If you take a look at it, you'll understand why it's so heavy, and why it cant be improved short of attempting to multithread it.

Not sure why the packet is so heavy though. I can take a look at it.

CammiePone commented 2 years ago

If I were to remove the should slow down method, furnace minecarts would be pretty useless as they'd derail around any and all corners.

If I removed the packet, you wouldnt have any chain renders.

CammiePone commented 2 years ago

Yeah as far as I can tell, the packet shouldn't be causing any lag what so ever.

image

Did you make this issue after spawning in the minecart and noticing a dip in performance, or was there just poor performance so you ran a profile to see what might be causing it?

Julian-MJK commented 2 years ago

Sorry for the slow reply Huh it's odd that it's so performance heavy then And the context is that the world was running slow in general so I ran a profiler, I don't think this mod was the cause but it still had the highest performance profile on Spark so I thought I'd bring it up here. There were no minecarts in the world, and I wasn't near any rails, thought I was running around in chunks that had an abandoned mineshaft, with lots of rails though no minecarts, at most one or two (I've gone through breaking the minecarts I found and used xray to light it all up to prevent spawning, so I don't think I missed any). Maybe there's a way to only make it run when there are active minecart entities/chained/furnace minecarts

CammiePone commented 2 years ago

Is this singleplayer or multiplayer? If multiplayer, the server may just need a restart, but if it's singleplayer, it's probably just the game.

CammiePone commented 1 year ago

Will has fixed this in the latest PR