GithubHelp home page GithubHelp logo

Comments (6)

pau101 avatar pau101 commented on June 29, 2024

Doing my own testing shows perfectly fine performance, 4% for onGetCollisionBoxes:
snapshot
I tested with this setup:
setup

I'll need your world save so I can test your exact circumstances.

from fairy-lights.

Builderb0y avatar Builderb0y commented on June 29, 2024

I've replicated the issue in a fresh super flat world, so the world itself doesn't seem to be important. I'll test it again with nothing but fairy lights installed, and if the issue vanishes, then I'll try re-adding mods until it shows up again.

Ok so this is very strange, I can no longer reproduce the issue even in the same world I was using when I first reported it (and by extension, the same mod pack/config files too). To make things weirder, I've looked at the code for that method and all it seems to be doing is checking for nearby ladders. However, there were no ladders in any of the worlds I used while testing this issue.

I guess I'll re-add fairy lights to my server and let you know if it happens again.

AND… it's back. This is either an issue with dedicated servers, or something related to the roots mod (as that's also mentioned in visual VM). Time for more testing!

Neither roots, nor dedicated servers have made this issue any more reproducible, which means there's something in my current server world that seems to be breaking ALL particles. Copy/pasting my server world into my SP saves folder confirms this. Additionally, it persists until the client is restarted, and does not fix itself when joining a different world.

from fairy-lights.

Builderb0y avatar Builderb0y commented on June 29, 2024

Several hours of testing later, and I finally found the cause: advanced rocketry's rockets seem to cause particles to lag horribly with fairy lights installed. The issue starts when a rocket entity is spawned on the client, and persists until the client is restarted.

@zmaster587 Any ideas why this might be happening? I know entities can collide with rockets just like they do with boats, but that alone shouldn't cause issues like this. After all, I was able to spawn at least 100 boats without any issues.

from fairy-lights.

zmaster587 avatar zmaster587 commented on June 29, 2024

from fairy-lights.

pau101 avatar pau101 commented on June 29, 2024

I've determined the cause of this issue. There is a value World.MAX_ENTITY_RADIUS, which controls the search size for finding entities within AABBs, by default it is 2. The rocket entity from Advanced Rocketry sets this value to 100 in its onUpdate method, seen here.

I imagine it does this so that the entity can get away with being large, but changing World.MAX_ENTITY_RADIUS to 100 is not the correct solution.

It results in at least 144, derived from (⌊100 ÷ 16⌋ × 2)2, chunks needing to be searched for entities any time the client needs to find entities within bounding boxes.

This issue is very apparent with Fairy Lights and many particles because I use an event provided by Forge to make the steps of my step-ladder walkable. It is very easy to produce a lot of particles so for particles it is very apparent but having many of different vanilla things could make the same rocket inefficiency visible.

Looking at my code for the step-ladder collision I should be making the collision only active for entities like how normal entity collision is, e.g. boats have hard collision. So, I can resolve this occurrence of the issue by doing so, but @zmaster587 should alter rocket collision to not increase World.MAX_ENTITY_RADIUS to the insane amount to improve overall performance.

from fairy-lights.

pau101 avatar pau101 commented on June 29, 2024

I've released 2.0.1 which resolves particles causing lag once a rocket has been in the game.

from fairy-lights.

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.