Dismiss Notice
This Section is READ ONLY - All Posts Are Archived
Thread Status:
Not open for further replies.
  1. AoiBlue

    AoiBlue Avatar

    Messages:
    406
    Likes Received:
    319
    Trophy Points:
    55
    Gender:
    Male
    I would like to note that I noticed a lot of GC lag in the game.

    Reading the Unity 3D manual in the past for my time as a volunteer PlayTester for Kerbal Space Program, I happen to know that there are certain ways to reduce this using properly timed explicit GC routines.

    Unity3D fails to run Explicit GC when other game engines would, and presumes the programmer would have it.

    Explicit GCs allow you to create a strategized performance trade-off in the game by doing a garbage collection run when a pause is tolerable instead of later when it is not.

    Specific times to consider run explicit GCs:
    1. Before the scene load sequence if available memory is low.
    2. After loading the scene but before transitioning to it always.
    3. Before opening NPC dialog.
    4. After closing an NPC dialog.
    5. When not in combat for an extended period of time.
    6. While Loading crafting dialog
    7. While initiationg crafting
    8. While closing crafting dialog.


    These are all times when stutter would be less noticeable and GC might be necessary.

    Some of these should be direct explicit, while others should be conditional (on check of available memory threshold which should be tuned for each one).

    Personally I wish Unity3D would hurry up with their new GC engine. They are still using only a minimally modified one that dates back to the 1990s (long before Unity3D was created.) It was one of the first GCs and the first one with selective world stop.

    Honestly I think they should add a non-world-stop scavenge to help reduce GC lag at the expense of background processing and memory bandwidth on secondary threads. If you could forward this idea to them it would be nice. (Being a featured game you might get through. They seem very unresponsive on the matter being heavily focused on the long-term solution of their new GC architecture that won't be ready for several more years according to their devs.)
     
Thread Status:
Not open for further replies.