[RANT] Minecraft is NOT single threaded

Discussion in 'Spigot Discussion' started by MrIvanPlays, Sep 11, 2020.

Thread Status:
Not open for further replies.
  1. The lack of knowledge amongst the minecraft community about this topic made me create this.

    I see people here and there which when discuss performance claim "minecraft is single threaded". That's not true.
    In fact, the proof is there when you start up spigot:
    [​IMG]
    Everything marked with red here is a different thread (the "Server thread" being the main one), and you can see they're being used multiple times.

    What probably people mean to say is that "minecraft is single CORED". See, its CORED, and not THREADED. There's a difference from the earth to the moon between a "thread" and a "core" . In fact, there are some (rare) cases where it can take advantage of multiple cores (for example, when you force upgrade your world).

    So lets correct that sentence. Minecraft can take up advantage only of 1 cpu core in most of the time.
     
    • Optimistic Optimistic x 16
    • Informative Informative x 2
  2. lol
     
    • Friendly Friendly x 1
  3. IntellectualSites

    Supporter

    Thanks for this very informative post. I have learned a lot and this has most certainly made me a better developer. I shall use this newfound knowledge to perform miracles.
     
    • Funny Funny x 6
    • Agree Agree x 2
  4. Understandable, have a nice day.
     
    • Winner Winner x 1
  5. its not targetted on developers, a good developer already knows that. its target is to server owners and people who can't code. u can see where this was posted
     
    • Informative Informative x 1
  6. Just run jstack on a running server and everything you just said will be disproven.
     
    • Friendly Friendly x 1
    • Optimistic Optimistic x 1
  7. Optic_Fusion1

    Resource Staff

    damnit you should of just lol'd with the rest of us XD


    but yea, SOME stuff is multi-threaded, not everything
    There's a lot more things that should be Threaded but aren't for one reason or another
     
    • Agree Agree x 1
  8. just because not everything is multi threaded doesn't mean claming it is single threaded isn't wrong.
     
  9. lol
     
    • Funny Funny x 1
  10. I thought multi-threading always equals to multi-coring (if there's more than one core), why'd they restrict threads to single core?
     
  11. nope

    they don't. the 2 things responcible here are java and mojang's spaghettios. see in order to make java use multiple cores you need to create a lot of threads constantly, the problem with minecraft is that it is based around a main thread, and for that you blame mojang's spaghetti.
     
  12. Optic_Fusion1

    Resource Staff

    *Notch's spaghetti, the code for the versions he worked on isn't really the best.
    They worked off what he did and never did a full re-write
     
  13. the current minecraft developers still do spaghetti, so the correct thing should be notch's and mojang's spaghettios.
     
Thread Status:
Not open for further replies.