Forum rules - please read before posting.

GC.Alloc being called 769 times and Constant.ID 100

Hi,
These 2 seem to be the main slowdowns of my game now since everything else is fixed
It causes these lag spikes that makes my game stutter every few seconds
https://i.imgur.com/LmA37s5.png
Is there a way to find what is causing the GC.Alloc?
And why is constant.id update() being called 100 times per frame?

Thanks!

Comments

  • Is there a way to find what is causing the GC.Alloc?

    Running Deep Profile mode in the Profiler may reveal more, but it's referring to StateHandler.cs' Update function. How intensive this is depends on your settings and scene conditions (how many e.g. Hotspots, for example). It may be worth commenting out different sections of it in turn to see which one was causing the issue.

    And why is constant.id update() being called 100 times per frame?

    It'll be based on how many ConstantID / Remember components are based in your scene, but this is an Editor-only operation. This won't occur in builds.

  • edited September 2019

    Hi Chris
    Ok deep profiler seems to have showed me things I wasn't expecting
    One of them appears to be about loading the level async - I disabled that and that part went away.
    The other weirdly was about menus?
    https://imgur.com/a/jvJV16i

  • The second is related to text tokens, which again is necessary if you want to use AC's Label elements to display e.g. variable values.

    There are some optimisations I can make here, which I'll look into for v1.69.0.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.