Stop using tags if you have only 1 tag

Not favoritedFavorited Favorited 1 favourites
  • 8 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • If you are using Object has tags when you use only one tag all the time, you'd better reconsider using some instance variable instead.

    The CPU test shows massive changes in the CPU profile per groups. (tested with r449.2)

    Try it yourself, disable all the groups and enable them 1 by 1, then run the project and check the CPU profile: OneDrive

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks for testing it out!

    Also can do without disabling groups as you can compare each Group's performance in the CPU tab while debugger is open:

  • thanks for testing it out!

    Also can do without disabling groups as you can compare each Group's performance in the CPU tab while debugger is open:

    True, but I don't trust cross comparison on the same run of a project for some reason 😁, so I prefer to run each group separate.

  • Try Sprite.TagAt(0)="something"

    Seems that "compare two values" uses less cpu

  • also see:

    github.com/Scirra/Construct-feature-requests/issues/391

    Here I benchmarked a different implementation for tags giving me a 4-3x performance increase for realistic amounts of tags used.

    A set only starts out performing an array once it has many entries, which is not a realistic usecase for tags.

    (As I don't have c3 source code I couldn't test in place though, so take it with a grain of salt)

  • I looked at the implementation and it's slow because it's technically correct (checks if the incoming set of tags is a sub set of the corresponding instance tags), but does so in an inefficient way.

    I think it can be made to be about 50% faster, by handling the special case of a single tag and in other cases, improving the check against the existing tags set. That would be it for improvements though, I don't think it can be made to be much faster because the condition is inherently more complex than just comparing two values.

  • The problem is the following, as with a lot of C3 features: the feature is good but there is no documentation for what it shouldn't be used = devs need to test a lot of stuff to find out that from 10 ways of doing 1 thing, only 1 is really what they need for their scenario.

  • I think the team needs to find a routine to test performance on already implemented features.

    These kinda posts doesn't give me peace of mind even tho it might not be that serious... lol

    I hope the upcoming beta releases will have performance optimisations to get the adrenaline going...

    (ง •̀_•́)ง

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