Laggy large builds? Here is a temp fix!

    Joined
    May 26, 2013
    Messages
    1,176
    Reaction score
    939
    • Legacy Citizen 7
    • Modder
    • Top Forum Contributor
    Are you sick of that lag stutter when you place down your 5 millionth power tank? Do you wish there were a less laggy way to build large craft?

    Here's what you do!

    1. Start a dedicated server on the PC you're playing on.
    2. Connect to that server using localhost:4242

    Now load up your ship and continue building!


    Why it works:

    Running a dedicated server allows for more ram to be allocated to the game in total.

    "With huge structures the reason for your lags could actually be memory. The game will stall on garbage collection if there is too much. With a second instance your memory effectively doubles, so garbage collection will no longer stall (since it can be collected before it fills up)." -Schema

    This will only work if it is your processor that is your bottleneck.
     

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    StarMade is multithreaded. Java does use process sharing for thread and will utilize multiple cores (if not there is something wrong). On my machine (also quad-core, the usage does go up over 25%, when e.g. a new planet is visited (it is generated on the cpu, rather then loaded from disk causing I/O)

    The issue is, that it is an I/O bound application: This means that threads & processes have to wait on operations on the disk to finish. Running server and client on two different hard disks would actually be a performance boost I think. But independent processes using 25% is not much of an indication unfortunately.

    Can you check your memory footprint in he top left with a single instance. With huge structures the reason for your lags could actually be memory. The game will stall on garbage collection if there is too much. With a second instance your memory effectively doubles, so garbage collection will no longer stall (since it can be collected before it fills up).
     
    Joined
    May 26, 2013
    Messages
    1,176
    Reaction score
    939
    • Legacy Citizen 7
    • Modder
    • Top Forum Contributor
    Thanks! So it\'s memory, not processor, that makes more sense.
    Edit\'d original post.

    As for the memory footprint, it normally sits at around 150,000kb free with a fairly large build for me.977,004 kb total.