Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple event regist and unregist generate too much GC #456

Open
huleli opened this issue Jun 29, 2021 · 1 comment
Open

Multiple event regist and unregist generate too much GC #456

huleli opened this issue Jun 29, 2021 · 1 comment
Labels
? Action required: missing information, question to answer, or CLA not signed

Comments

@huleli
Copy link

huleli commented Jun 29, 2021

Short description
The scriptable object event system is a smart way and I like the style. But I get one performant issue.
Take InputReader as an example, In my case, I use about 40 gameobjects.

Each gameobject use a simple regist and unregist in OnEnable and OnDisable.

and enable gameobject and disable gameobject.

Then I noticed a lot GCAlloc about 60kb of 11 calls in profiler.

Is there a way to get that GCAlloc as less as possible?
In my case, there may be about 30 or more gameobjects enable or disable in one frame.

@ciro-unity ciro-unity added bug (minor) The game could potentially ship with this bug enhancement New feature or request labels Jun 30, 2021
@ciro-unity
Copy link
Contributor

But I get one performant issue.

Is this a performance issue on Chop Chop, or on your game?
Different games might require different architecture. We created this system for Chop Chop, and it does the job. If the performance is low on Chop Chop, we'll look into fixing it, but otherwise it is something that you'd need to figure out on your own, sorry!

@ciro-unity ciro-unity added ? Action required: missing information, question to answer, or CLA not signed and removed enhancement New feature or request bug (minor) The game could potentially ship with this bug labels Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? Action required: missing information, question to answer, or CLA not signed
Projects
None yet
Development

No branches or pull requests

2 participants