1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

RFC Create a (optional) PHP extension for NBT and chunk stuff.

Discussion in 'Contributing & RFCs' started by TheDiamondYT, Apr 25, 2017.

?

Should this be done?

  1. Yes

    8 vote(s)
    53.3%
  2. No

    7 vote(s)
    46.7%
  1. TheDiamondYT

    TheDiamondYT Zombie

    Messages:
    298
    GitHub:
    TheDiamondYT1
    This would be an optional exstension.

    I think that by implementing chunk loading and NBT loading into a native extension, server owners could speed up their servers.

    @dktapps has already created an extension for chunk utils: https://git.io/v9mav
    @shoghicp (yes, i know its not really him) created an extension a while ago (2014!) which contained native code for level generating, math operations and the binary class: https://git.io/v9mal

    By implementing both of these plus NBT into an extension we could (hopefully) speed up important aspects of PocketMine for server owners who would like to.

    Why NBT in this extension?
    The current NBT implemention is bad (#blameshoghi). Obviously the current library needs a rewrite but we could go one step further by implementing it in this extension.

    But we are busy! We have more important things to worry about!
    That's not a problem. This isint a top priority thing, i just thought i'd make the suggestion.

    Why did you use git.io in this thread?
    Because i can.

    Please feel free to vote on the poll.
     
    MK500 and jasonwynn10 like this.
  2. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    This isn't a new idea.

    As I said on GitHub, C-ifying it isn't going to magically make it faster. There are significant barriers to implementing a full-featured NBT library into C, and a matching PHP implementation to make it optional would be far more difficult. If any such extension is created, it will be mandatory.
     
    jasonwynn10, Muqsit and SOFe like this.
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    A poor design of the NBT framework has nothing to do with making it into C. It can be well-rewritten in PHP without any design issues.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.