Git Product home page Git Product logo

Comments (3)

null321-jared avatar null321-jared commented on June 1, 2024

This is what it did after a few minutes after spawning a few playerNPCs (Keep in mind it does it for every NPC, not just playerNPCs): https://timings.spigotmc.org/?url=hevogoyanu

Is there some way we can replace the Watcher system and instead use Bukkit events? I cannot use this on a public server if it cuts the TPS in a matter of minutes.
I am willing to do this, but I need to know about it before I can do it.

How did you do it in the original NPC lib?

from compactnpclib.

FormallyMyles avatar FormallyMyles commented on June 1, 2024

Would you be able to provide more information in relation to your profiler output? (Are you able to break it down more so more info about the methods with issues)

As an overview, it's possible the reflectionhelper could be optimised a bit more (precompiling patterns) but i'm unsure how much speed increase it could give:

https://github.com/InventivetalentDev/ReflectionHelper/blob/master/src/main/java/org/inventivetalent/reflection/resolver/wrapper/MethodWrapper.java#L246

Could be precompiled as a pattern and saved in the object but i'm unaware how many calls to this happen.

from compactnpclib.

null321-jared avatar null321-jared commented on June 1, 2024

I just tried pre-compiling, however it creates the object once, then does the matching so it made no difference.
Here is the profiler output: http://i.imgur.com/COYFxF9.png
It stays at a steady CPU usage that is significantly higher than it should be, as if it is in some sort of infinite loop or is limited my something.

from compactnpclib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.