SnpM / LockstepFramework

Framework for lockstep RTS, TD, and MOBA games.
MIT License
1.39k stars 348 forks source link

Agent Scan Always Have GC Alloc #133

Closed zikerlin closed 6 years ago

zikerlin commented 6 years ago

gc alloc

Scan->BehaveWithTarget

SnpM commented 6 years ago

Hey Zikerlin, thanks for the heads up. I can't easily reproduce this. How many units are you simulating?

zikerlin commented 6 years ago

Hi John Pan, I use 400 units to simulating.

2017-11-24 23:21 GMT+08:00 John Pan notifications@github.com:

Hey Zikerlin, thanks for the heads up. I can't easily reproduce this. How many units are you simulating?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SnpM/LockstepFramework/issues/133#issuecomment-346850988, or mute the thread https://github.com/notifications/unsubscribe-auth/AGj3A7bchdFi9SIX5OCYwoXN55utw-dvks5s5t7rgaJpZM4Qphvy .

SnpM commented 6 years ago

Ah, sorry for the late response. Busy with life and stuff.

400 units is a decent number of units. If they're all clumped up in the same place, a lot of calls will be made to search for targets to attack. Also deep profiler adds a minor hit on each method called since it's logging in a stopwatch. From those statistics though, Lockstep Framework should run with no significant performance issues.