Permalink
Browse files

Remove brute force garbage_collect() calls.

Remove brute force garbage_collect() calls in favor of process spawn
options (i.e. [{spawn_opt, [{fullsweep_after, 5}]}]).
  • Loading branch information...
1 parent ce139ec commit 6bb3818600a0a13129486097486224c7c9d09c10 @norton norton committed Sep 25, 2012
Showing with 0 additions and 5 deletions.
  1. +0 −1 src/ubf_client.erl
  2. +0 −4 src/ubf_plugin_handler.erl
View
@@ -436,7 +436,6 @@ lpc(Mod, Q, State, TLogMod) ->
Reply ->
%% check contract
{_, NewReply} = do_lpcOut(Ref, Q, State, Mod, Reply, State, State, Mod, TLogMod),
- erlang:garbage_collect(),
{reply,NewReply,State}
end
end.
@@ -97,7 +97,6 @@ loop(Client, State, Data, Manager, Mod, TLogMod, Fun) ->
case (catch Mod:handlerRpc(State, Q, Data, Manager)) of
{Reply, State1, Data1} ->
Client ! {self(), {rpcReply, Reply, State1, same}},
- erlang:garbage_collect(),
loop(Client, State1, Data1, Manager, Mod, TLogMod, Fun);
{changeContract, Reply, Mod1, State1, Data1, Manager1} ->
Client ! {self(), {rpcReply, Reply, State,
@@ -120,18 +119,15 @@ loop(Client, State, Data, Manager, Mod, TLogMod, Fun) ->
exit({serverPluginHandler, Reason});
Reply ->
Client ! {self(), {rpcReply, Reply, State, same}},
- erlang:garbage_collect(),
loop(Client, State, Data, Manager, Mod, TLogMod, Fun)
end
end;
{Client, {event_in, Event}} ->
%% asynchronous event handler
Fun1 = Fun(Event),
- erlang:garbage_collect(),
loop(Client, State, Data, Manager, Mod, TLogMod, Fun1);
{event_out, _}=Event ->
Client ! {self(), Event},
- erlang:garbage_collect(),
loop(Client, State, Data, Manager, Mod, TLogMod, Fun);
{install, Fun1} ->
loop(Client, State, Data, Manager, Mod, TLogMod, Fun1);

0 comments on commit 6bb3818

Please sign in to comment.