1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<tt>
<div dir="ltr">my http handler receives messages carrying json parts obtained from a twitter stream by a separate process. the twitter stream is the stream of all public tweets, (they call it "firehose") so there are a lot.</div><br>
<div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/19 Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
How much is a lot of messages?<br><br>
<br><br>
Hibernating is a bit more expensive on the CPU but better for saving memory. It's generally fine to use except when you have a really busy system. Do note that it also means your responses will be slightly slower (though that is generally not noticeable).<div><br>
<div class="h5"><br><br>
<br><br>
On 09/19/2013 06:30 AM, akonsu wrote:<br><br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><br>
Hello,<br><br>
<br><br>
from the documentation:<br><br>
<br><br>
info(Info, Req, State) -> {ok, Req, State} | {loop, Req, State}| {loop,<br><br>
Req, State, hibernate}<br><br>
<br><br>
<br><br>
in case my handler receives a lot of messages, and they come very often,<br><br>
does a response of the latter form {loop, Req, State, hibernate} save<br><br>
anything? Can hibernating in this case actually hinder performance?<br><br>
<br><br>
thanks<br><br>
Konstantin<br><br>
<br><br>
<br></div></div><br>
______________________________<u></u>_________________<br><br>
Extend mailing list<br><br>
<a href="mailto:[email protected]" target="_blank">[email protected]</a><br><br>
<a href="http://lists.ninenines.eu:81/listinfo/extend" target="_blank">http://lists.ninenines.eu:81/<u></u>listinfo/extend</a><br><br>
<br><span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote><span class="HOEnZb"><font color="#888888"><br>
<br><br>
<br><br>
-- <br><br>
Loďc Hoguin<br><br>
Erlang Cowboy<br><br>
Nine Nines<br><br>
<a href="http://ninenines.eu" target="_blank">http://ninenines.eu</a><br><br>
</font></span></blockquote></div><br></div><br>
</tt>
|