Block-count vs entity-count impact on performance?

    Joined
    Mar 10, 2016
    Messages
    561
    Reaction score
    1,670
    • Likeable Gold
    • Community Content - Silver 2
    • Thinking Positive
    I recently experienced a substantial performance decrease while working on a large ship intended to carry a fleet of 12 fighters docked in its hangar bay (you can download its shell here: https://starmadedock.net/content/so...on-shell-with-engine-rotation-functions.7455/).


    I guess the main thing I want to ask here is whether it is normal to get a performance decrease like the example in the image below, but I would also be interested if someone has some technical wisdom to share about the impact of block-count and entity-count on performance.

    When I spawned the 12 fighters, the total number of loaded blocks increased by about 10%, the total number of loaded entities by something like 30%, while the FPS dropped to less than half... The thing is, I have a station in the same universe (far away), which has more than 100 docked entities and probably more than a million blocks in total, and I always get 40-45 FPS while around it.

    It would help to familiarize with these things to be able to plan ahead next time around... For now, I'll either save the ship with only maybe 4 or 6 of the fighters attached, or tweak my game settings a bit. Any info/advise about these things?



    3.jpg
     
    Last edited:

    Dr. Whammy

    Executive Constructologist of the United Star Axis
    Joined
    Jul 22, 2014
    Messages
    1,793
    Reaction score
    1,735
    • Thinking Positive
    • Likeable Gold
    • Legacy Citizen 9
    Some of the most intense lag I've experienced (caused) was due to having too many entities in close proximity. Having too many close or docked entities will cause their bounding boxes to overlap and cause an exponential increase in collision checks.

    A good example would be my 100m long frigate, armed with a 100 round automatic torpedo launcher. It had roughly 140 cores crammed so close together that it generated quintuple digit ping in multi-player.
     
    Last edited:

    Az14el

    Definitely not a skywanderers dev
    Joined
    Apr 25, 2015
    Messages
    848
    Reaction score
    325
    • Legacy Citizen 2
    • Purchased!
    • Community Content - Bronze 1
    I'd say that's likely the bounding boxes overlapping as well, even while docked this can happen
    entity counts tend to be worse than pure blocks, though either can obviously become a strain on a server past a point
     
    • Like
    Reactions: DeepspaceMechanic
    Joined
    Feb 10, 2017
    Messages
    350
    Reaction score
    776
    • Community Content - Bronze 2
    • Legacy Citizen 5
    • Likeable
    Just had a look at your shell. Very nice. I particularly like your radar dish and antenna on the top. Cool detailing and I'm pinching some of that. ;)
    but... repulsor modules are really bad for performance in my experience and you have a bunch of them spread around. I removed them on the basic shell and it seemed to settle somewhat. Try swapping the repulsors out on all the entities and see if it makes a difference?
     
    • Like
    Reactions: DeepspaceMechanic
    Joined
    Mar 10, 2016
    Messages
    561
    Reaction score
    1,670
    • Likeable Gold
    • Community Content - Silver 2
    • Thinking Positive
    Ok, so much bounding box overlapping, resulting collision-check increase, and repulse modules - noted.

    Repulse modules... I heard they're a risky decorative choice. Probably because they produce extra calculations when trying to figure out how to modify the motion of the structure they're built on, even if you don't allocate any of your thrust to them / have nothing around you from which they could repel.


    And I guess the better performance around that 100+ docked entity station I mentioned in the OP is a bad comparison, given that stations are stationary, and thus their blocks are probably involved elsehow in collision-checking (they never have to be displaced).
     

    Dr. Whammy

    Executive Constructologist of the United Star Axis
    Joined
    Jul 22, 2014
    Messages
    1,793
    Reaction score
    1,735
    • Thinking Positive
    • Likeable Gold
    • Legacy Citizen 9
    Also, If you have any non-turret docked entities, it's a good idea to use a rail speed controller to set their speed to zero. This will further reduce collision checks.
     
    • Like
    Reactions: DeepspaceMechanic