Pannoniae / sodium-forge

A Fabric..... I mean Forge mod designed to improve frame rates and reduce micro-stutter
GNU Lesser General Public License v3.0
78 stars 10 forks source link

Separate Lithium and Phosphor #10

Open Dum4G opened 3 years ago

Dum4G commented 3 years ago

Hi! Is there a chance Lithium and Phosphor will be separated in the future? I'm trying to find ways to reduce chunk loading impact on a server running Arclight - which unfortunately is based on Spigot and struggles with our demands. At this moment it's hard to report issues of your mod since Sodium is a client-side one

Pannoniae commented 3 years ago

I can do it. :) BTW just saying that Sodium is client-side, so the the mixins are not even loaded while on the server.

Dum4G commented 3 years ago

Awaiting for you since I've already encountered issues but I want to be precise in describing them

Pannoniae commented 3 years ago

go ahead :)

charagarlnad commented 3 years ago

+1 on seperate files for sodium/lithium/phosphor, I want to use starlight in replacement of phosphor.

Dum4G commented 3 years ago

I can do it. :) BTW just saying that Sodium is client-side, so the the mixins are not even loaded while on the server.

Looks like they do


org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: PRIVATE @Overwrite method func_177482_a in sodium.mixins.json:chunk.MixinChunkNibbleArray cannot reduce visibiliy of PUBLIC target method
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.conformVisibility(MixinPreProcessorStandard.java:472) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachSpecialMethod(MixinPreProcessorStandard.java:445) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachOverwriteMethod(MixinPreProcessorStandard.java:406) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachMethods(MixinPreProcessorStandard.java:336) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:289) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:267) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1271) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:287) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:223) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinTransformationHandler.processClass(MixinTransformationHandler.java:121) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.launch.MixinLaunchPlugin.processClass(MixinLaunchPlugin.java:131) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154) ~[modlauncher-8.0.9.jar:8.0.9+86+master.3cf110c]
    at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.0.9.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_252]
    at net.minecraft.world.lighting.BlockLightEngine.<init>(BlockLightEngine.java:20) ~[?:?]
    at net.minecraft.world.lighting.WorldLightManager.<init>(SourceFile:22) ~[?:?]
    at net.minecraft.world.server.ServerWorldLightManager.<init>(SourceFile:39) ~[?:?]
    at net.minecraft.world.server.ChunkManager.<init>(ChunkManagerMixin.java:138) ~[?:?]
    at net.minecraft.world.server.ServerChunkProvider.<init>(ServerChunkProviderMixin.java:77) ~[?:?]
    at net.minecraft.world.server.ServerWorld.<init>(ServerWorldMixin.java:184) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_240787_a_(MinecraftServerMixin.java:335) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_240800_l__(MinecraftServerMixin.java:308) ~[?:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServerMixin.java:168) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServerMixin.java:1857) ~[?:?]
    at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServerMixin.java:232) ~[?:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
[06фев2021 14:50:02.673] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:223) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinTransformationHandler.processClass(MixinTransformationHandler.java:121) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.launch.MixinLaunchPlugin.processClass(MixinLaunchPlugin.java:131) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154) ~[modlauncher-8.0.9.jar:8.0.9+86+master.3cf110c]
    at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.0.9.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_252]
    at net.minecraft.world.lighting.BlockLightEngine.<init>(BlockLightEngine.java:20) ~[?:?]
    at net.minecraft.world.lighting.WorldLightManager.<init>(SourceFile:22) ~[?:?]
    at net.minecraft.world.server.ServerWorldLightManager.<init>(SourceFile:39) ~[?:?]
    at net.minecraft.world.server.ChunkManager.<init>(ChunkManagerMixin.java:138) ~[?:?]
    at net.minecraft.world.server.ServerChunkProvider.<init>(ServerChunkProviderMixin.java:77) ~[?:?]
    at net.minecraft.world.server.ServerWorld.<init>(ServerWorldMixin.java:184) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_240787_a_(MinecraftServerMixin.java:335) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_240800_l__(MinecraftServerMixin.java:308) ~[?:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServerMixin.java:168) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServerMixin.java:1857) ~[?:?]
    at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServerMixin.java:232) ~[?:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [sodium.mixins.json:chunk.MixinChunkNibbleArray] from phase [DEFAULT] in config [sodium.mixins.json] FAILED during APPLY
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:642) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:594) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:356) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    ... 22 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: PRIVATE @Overwrite method func_177482_a in sodium.mixins.json:chunk.MixinChunkNibbleArray cannot reduce visibiliy of PUBLIC target method
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.conformVisibility(MixinPreProcessorStandard.java:472) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachSpecialMethod(MixinPreProcessorStandard.java:445) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachOverwriteMethod(MixinPreProcessorStandard.java:406) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachMethods(MixinPreProcessorStandard.java:336) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:289) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:267) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1271) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:287) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    ... 22 more
[06фев2021 14:50:02.676] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]:     Cause of unexpected exception was
org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [sodium.mixins.json:chunk.MixinChunkNibbleArray] from phase [DEFAULT] in config [sodium.mixins.json] FAILED during APPLY
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:642) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:594) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:356) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:223) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinTransformationHandler.processClass(MixinTransformationHandler.java:121) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.launch.MixinLaunchPlugin.processClass(MixinLaunchPlugin.java:131) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154) ~[modlauncher-8.0.9.jar:8.0.9+86+master.3cf110c]
    at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) ~[modlauncher-8.0.9.jar:?]
    at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.0.9.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_252]
    at net.minecraft.world.lighting.BlockLightEngine.<init>(BlockLightEngine.java:20) ~[?:?]
    at net.minecraft.world.lighting.WorldLightManager.<init>(SourceFile:22) ~[?:?]
    at net.minecraft.world.server.ServerWorldLightManager.<init>(SourceFile:39) ~[?:?]
    at net.minecraft.world.server.ChunkManager.<init>(ChunkManagerMixin.java:138) ~[?:?]
    at net.minecraft.world.server.ServerChunkProvider.<init>(ServerChunkProviderMixin.java:77) ~[?:?]
    at net.minecraft.world.server.ServerWorld.<init>(ServerWorldMixin.java:184) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_240787_a_(MinecraftServerMixin.java:335) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_240800_l__(MinecraftServerMixin.java:308) ~[?:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServerMixin.java:168) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServerMixin.java:1857) ~[?:?]
    at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServerMixin.java:232) ~[?:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: PRIVATE @Overwrite method func_177482_a in sodium.mixins.json:chunk.MixinChunkNibbleArray cannot reduce visibiliy of PUBLIC target method
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.conformVisibility(MixinPreProcessorStandard.java:472) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachSpecialMethod(MixinPreProcessorStandard.java:445) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachOverwriteMethod(MixinPreProcessorStandard.java:406) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attachMethods(MixinPreProcessorStandard.java:336) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:289) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:267) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1271) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:287) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown]
    ... 22 more
yatsukiko commented 3 years ago

Try latest version, as of now I only separated lithium. Any server issue related I will try to fix but this separate lithium installation will most likely not gonna be supported in future

Dum4G commented 3 years ago

latest.log debug.log

The same issue with the latest release, could be Arclight miscompatibility. Separated Lithium seems to work fine, thanks. In future, I'd like to have an option to disable Phosphor on my server since I'm opting-in for Starlight as well

yatsukiko commented 3 years ago

Arclight is not compatible and it might be hard to make it compatible, therefore I suggest for Arclight server use lithium + Starlight, sodium will do literally nothing.

jamierocks commented 3 years ago

If it helps I made https://github.com/jamierocks/lithium-forge a while back :)

Dum4G commented 3 years ago

If it helps I made https://github.com/jamierocks/lithium-forge a while back :)

Great job, doesn't cause any issues on Arclight so far! I wish it won't be abandoned as there's a new release with memory leak fixes

NioZX commented 3 years ago

So... is there any way to remove Phosphor? I'm trying to replace it with StarLight. I tried to do myself, but is way more complex than i thought. I'm using sodium-forge-2.1.jar.

axydavid commented 3 years ago

+1 please replace phosphor with starlight as it gives better performance. I think this github project aims to unify best performance mods together anyway.