I have searching for this problems and I found some UE3 games with the same issue, and some players talks about changing valours in the ini’s:
[Core.System]
MaxObjectsNotConsideredByGC
SizeOfPermanentObjectPool
But no changes in my case. Perhaps in the cooked game.
I have found this too:
TimeBetweenPurgingPendingKillObjects = 30
I have incremented to 120 and seems to work fine, the hitch is higher (from 50 ms to 62 ms) due more objects to purge, but happens every 2 minutes instead 30 secs. I think is a good deal.
I’m going to increment to 600 to see what happens. I can do a GC manually for example when open the pause or inventory, or the player is idle.
First test:
[0902.62] DevGarbage: Collecting garbage
[0902.67] DevGarbage: 50.814915 ms for realtime GC
[0902.80] DevGarbage: 133.373119 ms for unhashing unreachable objects
[0903.70] DevGarbage: GC purged 261649 objects (591699 → 330050)
objects purged takes 133 ms, instead 3 or 4. The peak is higher, but it’s one time every 10 minutes. The game seems stable, also the RAM.
if there are no unexpected problems, it seems like a good solution.