MinimallyCorrect / TickThreading

Historical multi-threaded minecraft by @LunNova. Performance over correctness. What could go wrong? Way too much.
https://jenkins.nallar.me/job/TickThreading/
MIT License
144 stars 43 forks source link

Less ambitious, less rubbish 1.12 release #1248

Open LunNova opened 8 years ago

LunNova commented 8 years ago

Tasks:

MrVoltz commented 8 years ago

Glad to hear you're coming back! I'm still sticking with your 1.5.2 release and fix everything myself :D.

Vycraftujto commented 8 years ago

Wooow welcome back!!! We are so glad your coming whit 1.8 !!!!

LunNova commented 8 years ago

Sorry about the spam when I closed all the issues there.

I've closed all the old issues, as I won't be doing any further work on older MC versions.

LunNova commented 8 years ago

I've added a task list with basic plans for the first preview release. Have I missed any features people depend on?

I want to try to avoid adding too many features. TT ended up with a LOT of feature creep.

For example, in the new version TT will not have its own profiling, as the same features will be in TickProfiler. I'll need to work on improving TickProfiler's profiling features to match what used to be in TT.

Slind14 commented 8 years ago

I'm not sure if you see a solution, anyways, the chunk unloading tends to be more intense than the load once the active/ticking tile entities hit +15k in the world. They are all stored in an array list and on chunk unload they are being removed. But to keep in mind, on tick update minecraft is iterating over the list, so other collections don't make sense either. On servers with +25k active tile ents we have run good with a list set combination. You gave us the idea about this some time back, not sure if you remember :) https://gist.github.com/Slind14/da64506db693f060afdd https://gist.github.com/Slind14/1531aa0d5db944cc61b0

What I could think of would be to run the chunkunloading only every n ticks for all chunks together, so that it only needs to go over the list once instead of for every chunk.

Anyways its all not about multi threading.

Regarding the collision fix, wouldn't make sense to be kept in separated mod, or would you use multithreading for it?

LunNova commented 8 years ago

I'm not sure if you see a solution, anyways, the chunk unloading tends to be more intense than the load once the active/ticking tile entities hit +15k in the world.

Old TT did as few operations as possible against those lists, and batched any additions/removals to them to once per tick using addAll/removeAll, which is much more efficient than separate remove calls. See TickManager.batchRemove(Tile)Entities. Added to task list.

Regarding the collision fix, wouldn't make sense to be kept in separated mod, or would you use multithreading for it?

Fair point. I had this fix in old versions of TT as it's reasonably easy and helps performance a lot. Spigot sort of did the same thing, but not as well/aggressively. It's not really threading related though.

Reopened #107. The name currently isn't representative of what TT aims to do. Performance improvements, some but not all due to threading.

My "NTweaks" mod is mainly a rushed stop-gap measure because I was running a server for a few friends and there were approximately infinite squid spawning, and I couldn't change dimensions more than a few times due to memory leaks. I'm surprised it's been useful for other people. New TT will be using the same style of configurable patching as used there, so any unwanted patches can be turned off.

Slind14 commented 8 years ago

Sounds good. My main concern regarding the collosion fix (and entity list batch remove) was that there might be users that don't want or can't use the multi threading part but would like to use this part. Kinda like nTweaks not being part of TT or ModPatcher.

Slind14 commented 8 years ago

I thought further about it and believe it would really be better if those non threading related and non critical patches would be in a separated mod. The performance impact of the collision patch and the entity list batch removes are a big improvement on their own. Especially the batch removes as those avoid the annoying lag spikes on base unload. From my understanding those wouldn't be too difficult to port. Hence they could probably be used way before the major multi threading is production ready and even on 1.7, if a back porting is manageable.

LunNova commented 8 years ago

What about Optifine style core/extra/ultimate (probably got the names wrong) releases?

Slind14 commented 8 years ago

Like?

LunNova commented 8 years ago

Yes, something like that.

(TickThreading-threaded really doesn't work as a name)

Slind14 commented 8 years ago

Do you want something functional (giving an idea of what it does) or creative (no relation, e.g. forge, bukkit, sponge, glowstone). Functional I could think of PerfOverhaul (performance overhaul). I'm not sure if that is a common word, in my native language it is used in terms of car and machine tuning.

LunNova commented 8 years ago

Quick status update:

  1. Still working on Mixin - trying hard to avoid the mess the prepatcher was in previous versions
  2. Expect to start working on network profiling in TickProfiler by Sunday
  3. Vague estimate of starting work on TT proper within two weeks

Still looking for input on the name. I'll make a poll once there are enough good suggestions.

PerfOverhaul - very descriptive, but also quite generic. Not sure if I like it

LunNova commented 8 years ago

Ended up working in a slightly different order. Started the work on 1.8.9 TT first, mainly by deleting lots of classes and adding a single Mixin, just to confirm that ModPatcherGradle + ModPatcher + Mixin are working correctly.

Next thing to do is to add network profiling to TP.

My website/jenkins/maven repo may be down for some time due to a hosting migration during the weekend.

ProsperCraft commented 8 years ago

Nallar please make a patreon so server owners can give tribute to your greatness :)

LunNova commented 8 years ago

Hosting migration is now complete.

Nallar please make a patreon

Maybe later, once it works.

LunNova commented 8 years ago

Status update:

TickProfiler for 1.7.10 and 1.8.9 both have support for all profliing options which TT used to have, except for the /ticks command which will continue to be TT only.

After far too much faffing around with classloading (maybe 4 hours?), including ModPatcher's API only in multiple mods of mine now works without conflicts and with automatic updating.

Now to start work on TT!

LunNova commented 8 years ago

Temporary downtime for nallar.me/jenkins starting in 5 minutes, lasting approximately 15 minutes while I swap the UPS the server is on.

Maintenance completed with no issues.

LunNova commented 8 years ago

Status update:

Done some work on TT. After starting to actually use the new mixin patching, I ran into some deficiencies mainly involving generics, so more work on JavaTransformer/Mixin was needed to get that working.

I won't be doing much if any work on this over the weekend, as I will be attending StrathHACK.

LunNova commented 8 years ago

Should have a testing release out by Friday evening GMT. It will not do any threading at all - only a few minor performance improvements.

Goal with this is to find any compatibility issues with the new patching system.

Slind14 commented 8 years ago

1.8.9 only I suppose?

LunNova commented 8 years ago

Yes

Slind14 commented 8 years ago

Unfortunately I'm not able to offer testing for 1.8.9

XPownage commented 8 years ago

@nallar Is the test release going to be out tonight?

LunNova commented 8 years ago

Ended up spending more time than expected working on a project for uni, so the testing release will probably be delayed until tomorrow. :(

I want to get the variants system (optifine style multiple release types) implemented as part of the testing release.

Sorry for the delay.

XPownage commented 8 years ago

@nallar Its alright, I'd rather want something that you are more conformable with releasing at the end of the day.

LunNova commented 8 years ago

First 1.8.9 testing release!. Grab the "-core" jar and drop it in your mods folder.

The aim is that it should do: absolutely nothing! A very minor performance improvement by hardcoding the current side in FMLCommonHandler, but nothing substantial.

Hoping to hear that it a) doesn't cause crashes b) has no noticeable impact. This is a test that the new patcher system isn't incompatible. The "-threaded" variant jar will break the game, that's expected.

XPownage commented 8 years ago

Awesome! I'll be more than glad to give you input on crashes and other related issues that I might find.

XPownage commented 8 years ago

@nallar Ok well I tired launching the core version and it just didn't work.
28.02 05:58:46 [Server] main/INFO [STDERR]: [java.lang.Throwable:printStackTrace:634]: Caused by: java.lang.ClassNotFoundException: me.nallar.modpatcher.ModPatcher$Version

LunNova commented 8 years ago

Oops - my test setup had the ModPatcher jar in the mods folder, so it didn't run into that problem. Should now be fixed.

XPownage commented 8 years ago

Tried it again and yet another crash occurred. [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:48]: Caused by: java.lang.NoClassDefFoundError: me/nallar/modpatcher/ModPatcherTransformer

LunNova commented 8 years ago

Can you put the full server log in a gist/pastebin?

XPownage commented 8 years ago

@nallar http://pastebin.com/xxbnU0aX This log is without other mods just to see if there was conflicts which apparently there wasn't.

LunNova commented 8 years ago

@XPownage Great, thanks. It should be fixed in the latest build. I've also added some more detailed logging information for ModPatcher loading.

LunNova commented 8 years ago

Sorry for the lack of work this week - a combination of coursework and factorio happened.

ModPatcher updating is now a lot less fragile, so hopefully won't be any more crashes on startup relating to it.

XPownage commented 8 years ago

@nallar Tried it again and still crashes, is there any other mods except mod patcher core and tick threading core I need?

LunNova commented 8 years ago

@XPownage It shouldn't need any other mods. :s

I think earlier failures may have left some broken files behind in your mods directory. Let's try a clean start.

Delete any files with ModPatcher in their name (eg: ModPatcher.jlib or ModPatcher-core.jar). Ensure the only TT related mod in your mods directory is the latest build, (currently TickThreading-1.8.9.50-core.jar).

I've spun up a fresh install of forge-1.8.9-11.15.1.1764-universal.jar, dropped in the latest TT build to the mods folder and it's starting up without any problems.

LunNova commented 8 years ago

I will now be targeting 1.10. Don't want to get stuck updating past versions again.

Slind14 commented 8 years ago

makes sense. How is your motivation about this, do you think there will be a production ready version, like 1.4.7 had?

ProsperCraft commented 8 years ago

We loved the 1.5.2 version, it worked like a miracle.

LunNova commented 8 years ago

@Slind14 I have a reasonable amount of motivation, but too little time. Less motivation than I used to though. :(

I'm trying to do it again, but realistically it's not happening. I expect to continue to have time to keep TickProfiler up to date, but TT is probably never going to be as good as it was when I had near-infinite free time due to being 16 years old!

Slind14 commented 8 years ago

Thanks for the honesty :)

tenten8401 commented 8 years ago

Is this still under development? By the way, you should really add a patreon.

cpypcy commented 8 years ago

Dude why not TT for 1.7.10? This is where all the mods are! It would be epic if you could make it for that. At least some basic simple version. Just like old times.

ghost commented 8 years ago

He's explained this time and time again. I suggest you do some research instead of asking a question that was asked dozens to hundreds of times before.

All in all, TickThreading for MC 1.7.10 is not happening, period.

Shybella commented 8 years ago

Yes, please aim for 1.10 it's a very promising version and sustainable. Don't get caught on updating late versions of MC.

dotModded commented 8 years ago

How's the progress going Nallar, I'm super interested in this.

cpypcy commented 7 years ago

I think going for 1.10.2 was a damn good idea, seems like mods are switching to 1.10.2.

tenten8401 commented 7 years ago

^

On Tue, Jan 31, 2017, 11:19 AM cpypcy notifications@github.com wrote:

I think going for 1.10.2 was a damn good idea, seems like mods are switching to 1.10.2.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nallar/TickThreading/issues/1248#issuecomment-276410927, or mute the thread https://github.com/notifications/unsubscribe-auth/AF42hyIpVffDAMsBfXqR2caCXlPbay8Eks5rX18bgaJpZM4HAeXY .

LunNova commented 7 years ago

Repo has been moved to a new organisation. Makes sense to not have this under my name, in case anyone else does start helping at some point. :P

Discord chat: https://discordapp.com/invite/YrV3bDm