Previously Process.monitor had been called in every recursion
for the target even though we only need to call it only once.
I observed that on production when using httpoison to consume server sent events. Noticed in the observer_cli:
I am currently using the PR code in production and it fixed the issue. Now also the blacked out processes to which I stream the server sent events ( so they are the target which has been monitored via Process.monitor(target) in the tranformer ) have a memory footprint of 8MB.
Previously
Process.monitor
had been called in every recursion for the target even though we only need to call it only once.I observed that on production when using httpoison to consume server sent events. Noticed in the observer_cli:
I am currently using the PR code in production and it fixed the issue. Now also the blacked out processes to which I stream the server sent events ( so they are the target which has been monitored via Process.monitor(target) in the tranformer ) have a memory footprint of 8MB.