investigate eccessive recursion causing excessive memory use
https://discord.com/channels/1126590789322035230/1163467816284991591/1236527728212312155 @kitty@kitty.social reported:
It looks like the largest consumer of memory in the heap snapshot is... a massive quote+reply thread (at 786MB of 1606MB total process memory, probably not representative of the full amount that would be used considering the process was interrupted to capture the heap), all notes (and their corresponding metadata, as copied data and not references) loaded as sub-objects of each other, possibly generated by a bot/autoposter from another server
investigate how that happens, and see if we can limit / stop it
I suspect some recursive call to ApResolverService
or some of the .pack
methods