Groups And Optimization

0 favourites
  • 2 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • I mainly use groups as an organizational tool (a group could contain some initialization code as well as other runtime code) to help me visualize different areas of my project, but since attempting to optimize my project I noticed some odd things:

    When I disable one of 2 groups I get around a 5fps performance increase even though that group only contains one off triggered event (on clicked etc)

    When I disable another group (and re-enable previous group) I see the same effect. AGain, the group only has individual triggers (no on tick events)

    When I disable both groups together I get a massive 20+ fps performance boost. Now, I'm no mathematician but 5+5 does not equal 20 so my questions are:

    • Why is this happening?
    • Am I wrong to use groups as an organizational tool. Are they purely meant for optimization?
    • Why would I get ANY performance increase at all when disabling a group that only contains one shot events?

    Thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It's impossible to tell from just a post like this. A group with a single event with a single action could itself enable hundreds of other events that do loads of intensive work. So it looks like the group is causing a big performance impact, but that's actually misleading.

    Use the profilers provided by Construct. They give you actual measurements about the time spent in various parts of your events and the engine.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)