Question
I'm developing a simple game for Samsung Tizen Z2 (similar to Flappy Bird using Construct 2). I'm experiencing performance issues where the FPS drops significantly every 60 seconds.
My questions are:
- Does the Garbage Collection run every 60 seconds by default?
- Is it possible to configure when Garbage Collection runs?
- Can I manually trigger Garbage Collection?
Thank you for your help.
Answer
Problem Understanding
The user is experiencing periodic frame rate drops in their Tizen game, suspecting it might be related to Garbage Collection (GC) running at fixed intervals.
Solution Methods
-
GC Behavior in Tizen:
- Garbage Collection in Tizen doesn't run on a fixed timer (like every 60 seconds)
- GC is triggered automatically when the system detects sufficient memory pressure
-
Alternative Performance Optimization Approaches:
- Profile your game to identify actual performance bottlenecks
- Reduce object creation/destruction cycles in your game loop
- Implement object pooling for frequently created/destroyed game objects
- Monitor memory usage to identify potential memory leaks
-
Manual GC Control:
- There is no direct way to manually trigger GC in Tizen applications
- Focus on optimizing your code rather than trying to control GC behavior
Additional Tips
- Consider using Tizen's profiling tools to analyze your game's performance
- Review your game's memory allocation patterns
- For Construct 2 games, check for any plugin-specific memory management issues
- The periodic FPS drop might be caused by other factors (like background processes) rather than GC