Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[REMINDER] About positions and WeakRef

Comments in 'Resources' started by PEMapModder, Aug 25, 2014.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    As most people know, I'm recently coding WorldEditArt. An experience from debugging it told me that positions are laggy.
    In Zekkou-Cake, positions use WeakRef to save Level objects. As a result, constructing instances of Position spends more time than ever. Therefore, if you are to create a large amount of Position objects, consider using many Vector3 instances and then a Level object or a WeakRef of it instead. Fit example, if looping and echoing x lines into consider spends ten seconds, looping and echoing x lines plus creating x position instances spends more than 5 minutes.
    GlaciercreepsMC and 64FF00 like this.

Share This Page

Advertisement