I faced a critical production problem involving severe performance drops and intermittent crashes during peak usage. The impact was direct on the end user: freezing interface, loss of interactions, and risk of abandoning the platform during high-traffic hours.
Problem:
Occasional crashes and sudden FPS drops after a few minutes of use.
The problem did not occur in a test environment, only in production under real load.
Symptoms pointed to memory overflow and excessive Garbage Collection.
Prioritization and approach
Immediate stabilization:
I reproduced the production scenario simulating high load locally.
I activated profilers to capture memory consumption, GC spikes, and allocations per frame.
Root cause isolation:
I identified multiple recurring allocations per frame in UI routines and animations.
Incorrect use of dynamic instantiation/destruction in critical loops.
DOTween animations being constantly recreated without reuse.
Technical Correction:
Refactored for consistent use of Object Pooling.
Eliminated unnecessary temporary allocations.
Restructured animations for tween reuse.
Adjusted update flow to reduce redundant calls.
Validation:
New profiling under simulated load.
Monitoring of production behavior after deployment.
Result:
Significant reduction in Garbage Collection spikes.
Elimination of user-perceived crashes.
Platform maintained stability during real access peaks.