Train Doors cause frame lag
IzMichael opened this issue ยท 6 comments
Describe the Bug
Whenever a train toggles its doors (opening when stopped, closing when moving), I experience major frame drops / lag spikes. I can usually run about 30-60 fps, but when the train doors open/close, I drop to 3-10 fps. This issue is significantly exacerbated when the train has double doors, as I drop to 1 fps for a few seconds.
Reproduction Steps
- Create a train with train doors.
- Move the train for a bit.
- Stop the train, observe lag spike
- Move the train again, as it starts, observe lag spike.
Expected Result
I expect not to have major frame drops
Screenshots and Videos
No response
Crash Report or Log
No response
Operating System
Windows 11
Mod Version
0.5.0i
Minecraft Version
1.19.2
Other Mods
Taken from the game logs, so some extra libraries will be included.
- advancementinfo 1.19.1-fabric0.58.5-1.3.1
- ae2 12.9.2
- ae2wtlib 12.8.5
- animatica 0.5+1.19
- antighost 1.19.1-fabric0.58.5-1.1.5
- architectury 6.0.34
- armorchroma 1.2.2
- autoreconnect 2.1.0-beta
- balm-fabric 4.5.1+0
- betterf3 4.0.0
- bettermounthud 1.2.0
- blockmeter 1.7
- blue_endless_jankson 1.2.1 via jankson
- bobby 4.0.0
- borderlessmining 1.1.5+1.19
- caffeineconfig 1.0.0+1.17 via sodium-extra
- camerautils 1.19.2-1.0.2
- capes 1.4.5+1.19
- carpet 1.4.83
- cem 0.7.1
- chat_heads 0.7.0
- chesttracker 1.1.17
- citresewn 1.1.2+1.19.2
- citresewn-defaults 1.1.2+1.19.2 via citresewn
- cloth-api 4.0.65
- cloth-basic-math 0.6.1 via cloth-api
- cloth-client-events-v0 4.0.65 via cloth-api
- cloth-common-events-v1 4.0.65 via cloth-api
- cloth-config 8.2.88
- cloth-scissors-api-v1 4.0.65 via cloth-api
- cloth-utils-v1 4.0.65 via cloth-api
- clumps 9.0.0+14
- collective 6.43
- colormatic 3.1.2+mc.1.19
- com_electronwill_night-config_core 3.6.5 via forgeconfigapiport
- com_electronwill_night-config_toml 3.6.5 via forgeconfigapiport
- com_github_llamalad7_mixinextras 0.1.1 via porting_lib
- com_google_code_findbugs_jsr305 3.0.2 via create
- com_moandjiezana_toml_toml4j 0.7.2 via dynamicfps
- com_typesafe_config 1.4.2 via bobby
- completeconfig-base 2.0.0 via elytraautopilot
- completeconfig-gui-cloth 2.0.0 via elytraautopilot
- conditional-mixin 0.3.0 via cull-less-leaves
- continuity 2.0.1+1.19
- controlling 10.0+7
- cool_elytra 1.4
- craftingtweaks 15.0.2
- create 0.5.0.i-961+1.19.2
- crowdin-translate 1.4+1.19 via antighost
- cull-less-leaves 1.0.6
- deathlog 0.2.10+1.19
- debugify 2.7.1
- decorative_blocks 3.0.0
- diggusmaximus 1.5.8-1.19
- dripstone_fluid_lib 2.0.1 via milk
- dynamicfps 2.2.0
- elytraautopilot 1.4.1
- enchanted-vertical-slabs 1.6.2
- entity_texture_features 4.1.1
- error_notifier 1.0.9 via roughlyenoughitems
- fabric-api 0.73.2+1.19.2
- fabric-api-base 0.4.15+8f4e8eb390 via fabric-api
- fabric-api-lookup-api-v1 1.6.14+93d8cb8290 via fabric-api
- fabric-biome-api-v1 9.1.0+82db024a90 via fabric-api
- fabric-block-api-v1 1.0.2+e415d50e90 via fabric-api
- fabric-blockrenderlayer-v1 1.1.24+c6af733c90 via fabric-api
- fabric-client-tags-api-v1 1.0.5+b35fea8390 via fabric-api
- fabric-command-api-v1 1.2.16+f71b366f90 via fabric-api
- fabric-command-api-v2 2.2.1+413cbbc790 via fabric-api
- fabric-commands-v0 0.2.33+df3654b390 via fabric-api
- fabric-containers-v0 0.1.41+df3654b390 via fabric-api
- fabric-content-registries-v0 3.5.1+7c6cd14d90 via fabric-api
- fabric-convention-tags-v1 1.2.2+27265b3490 via fabric-api
- fabric-crash-report-info-v1 0.2.8+aeb40ebe90 via fabric-api
- fabric-data-generation-api-v1 5.3.7+413cbbc790 via fabric-api
- fabric-dimensions-v1 2.1.35+0d0f210290 via fabric-api
- fabric-entity-events-v1 1.5.4+9244241690 via fabric-api
- fabric-events-interaction-v0 0.4.34+562bff6e90 via fabric-api
- fabric-events-lifecycle-v0 0.2.35+df3654b390 via fabric-api
- fabric-game-rule-api-v1 1.0.24+b6b6abb490 via fabric-api
- fabric-item-api-v1 1.6.5+dce4603e90 via fabric-api
- fabric-item-groups-v0 0.3.38+9244241690 via fabric-api
- fabric-key-binding-api-v1 1.0.25+5c4fce2890 via fabric-api
- fabric-keybindings-v0 0.2.23+df3654b390 via fabric-api
- fabric-language-kotlin 1.8.5+kotlin.1.7.20
- fabric-lifecycle-events-v1 2.2.4+1b46dc7890 via fabric-api
- fabric-loot-api-v2 1.1.12+83a8659290 via fabric-api
- fabric-loot-tables-v1 1.1.15+9e7660c690 via fabric-api
- fabric-message-api-v1 5.0.7+93d8cb8290 via fabric-api
- fabric-mining-level-api-v1 2.1.23+33fbc73890 via fabric-api
- fabric-models-v0 0.3.21+c6af733c90 via fabric-api
- fabric-networking-api-v1 1.2.11+10eb22f490 via fabric-api
- fabric-networking-v0 0.3.28+df3654b390 via fabric-api
- fabric-object-builder-api-v1 4.2.1+d8ef690890 via fabric-api
- fabric-particles-v1 1.0.14+4d0d570390 via fabric-api
- fabric-recipe-api-v1 1.0.1+413cbbc790 via fabric-api
- fabric-registry-sync-v0 0.9.32+9244241690 via fabric-api
- fabric-renderer-api-v1 1.2.1+2e5408b590 via fabric-api
- fabric-renderer-indigo 0.7.1+2e5408b590 via fabric-api
- fabric-renderer-registries-v1 3.2.24+df3654b390 via fabric-api
- fabric-rendering-data-attachment-v1 0.3.19+6e0787e690 via fabric-api
- fabric-rendering-fluids-v1 3.0.11+4d0d570390 via fabric-api
- fabric-rendering-v0 1.1.27+df3654b390 via fabric-api
- fabric-rendering-v1 1.12.1+d8ef690890 via fabric-api
- fabric-resource-conditions-api-v1 2.1.2+aae9039d90 via fabric-api
- fabric-resource-loader-v0 0.8.3+251d254a90 via fabric-api
- fabric-screen-api-v1 1.0.32+4d0d570390 via fabric-api
- fabric-screen-handler-api-v1 1.3.7+1cc24b1b90 via fabric-api
- fabric-sound-api-v1 1.0.2+c4f28df590 via fabric-api
- fabric-textures-v0 1.0.24+aeb40ebe90 via fabric-api
- fabric-transfer-api-v1 2.1.6+413cbbc790 via fabric-api
- fabric-transitive-access-wideners-v1 1.3.3+08b73de490 via fabric-api
- fabricloader 0.14.12
- fabrishot 1.9.1
- ferritecore 4.2.1
- flighthud 1.19-fabric-1
- flywheel 0.6.8.a-4 via create
- forge_tags 3.0 via porting_lib
- forgeconfigapiport 4.2.9 via create
- holdthatchunk 2.0.0
- horsebuff 2.0.1
- horsestatsvanilla 4.2.2
- indium 1.0.9+mc1.19.2
- inventoryhud 3.4.2
- inventoryprofilesnext 1.6.1
- io_leangen_geantyref_geantyref 1.3.13 via bobby
- isxander-main-menu-credits 1.1.1
- itemmodelfix 1.0.3+1.19
- itemscroller 0.17.1
- itemswapper 0.3.2-mc1.19.2
- jankson 4.1.1+j1.2.1 via libgui
- java 18
- kyrptconfig 1.4.14-1.19 via diggusmaximus
- lambdabettergrass 1.3.0+1.19
- lambdynlights 2.1.2+1.19
- languagereload 1.3.2
- lazydfu 0.1.3
- libgui 6.0.0+1.19 via horsestatsvanilla
- libninepatch 1.1.0 via libgui
- litematica 0.12.1
- lithium 0.10.0
- malilib 0.13.0
- memoryleakfix 1.19.1-0.7.0
- merequester 1.19.2-1.0.3
- midnightlib 0.6.0 via merequester
- milk 1.0.51 via create
- minecraft 1.19.2
- minihud 0.23.0-pre.1
- mixin-conflict-helper 1.2.0
- mixintrace 1.1.1+1.17
- mm 2.3 via porting_lib
- moderndynamics 0.4.0-alpha
- modmenu 4.0.6
- morechathistory 1.1.1
- moredecorativeblocks 1.19.2-1.0.1-[FABRIC]
- mtr 1.19.2-3.2.0
- no_fog 1.3.0+1.16.5-1.19
- nochatreports 1.19.2-v1.13.9
- nofade 1.18-2.0.1
- noindium 1.1.0+1.19 via ae2
- omega-config 1.2.3-1.18.1 via capes
- omniscience 1.0.4
- optigui 1.1.6
- org_apache_commons_commons-text 1.9 via optigui
- org_apache_httpcomponents_httpmime 4.5.10 via entity_texture_features
- org_jetbrains_kotlin_kotlin-reflect 1.7.20 via fabric-language-kotlin
- org_jetbrains_kotlin_kotlin-stdlib 1.7.20 via fabric-language-kotlin
- org_jetbrains_kotlin_kotlin-stdlib-jdk7 1.7.20 via fabric-language-kotlin
- org_jetbrains_kotlin_kotlin-stdlib-jdk8 1.7.20 via fabric-language-kotlin
- org_jetbrains_kotlinx_atomicfu-jvm 0.18.4 via fabric-language-kotlin
- org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm 1.6.4 via fabric-language-kotlin
- org_jetbrains_kotlinx_kotlinx-coroutines-jdk8 1.6.4 via fabric-language-kotlin
- org_jetbrains_kotlinx_kotlinx-datetime-jvm 0.4.0 via fabric-language-kotlin
- org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm 1.4.1 via fabric-language-kotlin
- org_jetbrains_kotlinx_kotlinx-serialization-core-jvm 1.4.1 via fabric-language-kotlin
- org_jetbrains_kotlinx_kotlinx-serialization-json-jvm 1.4.1 via fabric-language-kotlin
- org_joml_joml 1.10.4 via sodium
- org_spongepowered_configurate-core 4.1.2 via bobby
- org_spongepowered_configurate-hocon 4.1.2 via bobby
- organized_tabs 1.0.1
- playlist 1.1.0
- porting_lib 2.1.784+1.19.2 via create
- porting_lib_accessors 2.1.784+1.19.2 via porting_lib
- porting_lib_attributes 2.1.784+1.19.2 via porting_lib
- porting_lib_base 2.1.784+1.19.2 via porting_lib
- porting_lib_common 2.1.784+1.19.2 via porting_lib
- porting_lib_constants 2.1.784+1.19.2 via porting_lib
- porting_lib_entity 2.1.784+1.19.2 via porting_lib
- porting_lib_extensions 2.1.784+1.19.2 via porting_lib
- porting_lib_fake_players 2.1.784+1.19.2 via porting_lib
- porting_lib_lazy_registration 2.1.784+1.19.2 via porting_lib
- porting_lib_model_generators 2.1.784+1.19.2 via porting_lib
- porting_lib_model_loader 2.1.784+1.19.2 via porting_lib
- porting_lib_models 2.1.784+1.19.2 via porting_lib
- porting_lib_networking 2.1.784+1.19.2 via porting_lib
- porting_lib_obj_loader 2.1.784+1.19.2 via porting_lib
- porting_lib_transfer 2.1.784+1.19.2 via porting_lib
- pride 1.1.2+1.19 via lambdynlights
- puzzle 1.4.0-1.19
- puzzle-base 1.4.0-1.19 via puzzle
- puzzle-gui 1.4.0-1.19 via puzzle
- puzzle-models 1.4.0-1.19 via puzzle
- puzzle-splashscreen 1.4.0-1.19 via puzzle
- reach-entity-attributes 2.3.0 via create
- reeses-sodium-options 1.4.7+mc1.19.2-build.59
- registrate-fabric 1.1.50-MC1.19.2 via create
- replanter 1.3
- roughlyenoughitems 9.1.537
- serialization_hooks 0.3.26 via porting_lib
- shuffle 5.0.1
- shulkerboxtooltip 3.1.0+1.19
- signtools 1.0.0
- smoothboot 1.19-1.7.1
- sodium 0.4.4+build.18
- sodium-extra 0.4.11+mc1.19.2-build.68
- sound_physics_remastered 1.19.2-1.0.15
- spruceui 4.0.0+1.19 via lambdabettergrass
- starlight 1.1.1+fabric.ae22326
- team_reborn_energy 2.2.0 via moderndynamics
- trajectory-preview 2.0-1.18.2
- tweakeroo 0.14.0
- voicechat 1.19.2-2.3.10
- whereisit 1.14.11 via chesttracker
- worldedit 7.2.11-beta-02+315c5d0
- xaerominimap 22.13.0
- xaeroworldmap 1.26.1
- yet-another-config-lib 1.5.0
- yosbr 0.1.1
Additional Context
No response
Facing the same issue (Fabric 1.19.2). As soon as i open train door more than 1-2 times when the train is in assembled form.. FPS Drops to 1 Fps and sometimes client crashes with no crash report or any error in logs. (also happens when u arrive at a station and all doors open at same time... tried disabling that but still happens even if u pass thru 2-3 doors.. open and close them and fps keeps dropping and makes the game unplayable)
Edit: Version- create-fabric-0.5.1-b-build.1089+mc1.19.2.jar
Video for reference- https://www.veed.io/view/bb047299-1337-4514-bfa9-27ee1ad90272?panel=share
Can confirm I'm also seeing this in 0.5.1d on 1.20.1, even on a train with eight doors or so it causes a noticeable lagspike/freeze at the moment all the doors open or close. The more doors, the worse it gets. Testing with 0.5.1b on 1.19.2, the issue is also present but maybe a bit less severe.
I tried disabling some optimization mods like Ferritecore and Lithium and it was still present, so it doesn't seem related to those.
I had the 1.19.2 setup running on a server in the past and can't recall noticing it there, so it could be something that's only happening server-side that would be noticeable in singleplayer.
At first I thought it might be connected to the steam'n'rails addon, but I've got it happening on a bare-minimum setup, so it seems to be purely a Create issue. Interestingly, after pulling a bunch of blocks off of the train, the lag seems to have stopped. after adding a lot on, it gets worse, so it's not just the amount of doors that makes it worse, but also the complexity of the train itself (Though adding more doors will immediately make it a lot worse than more blocks will).
Can you share your modlist (both server and client) with me? even i am facing this issue on my server from months. And i don't think this issue is being worked on so i might aswell trying myself to figure which mod can be the culprit.
Was building an elevator, and it turns out it applies to those too! So I think this can be further marked up as just about any kind of create doors causing lagspikes on assembled contraptions.
Upstream issue, this is less so caused by doors and in reality caused by create joining all the voxel shapes together, which allocates a lot of objects which ends up causing the GC to struggle and in turn cause lag spikes. Doors end up causing triggering this by causing a full recalculation of the voxel shape everytime they open. This will be fixed by upstream eventually once a good enough is solution is found