[99s-extend] cowboy_loop_handler

akonsu akonsu at gmail.com
Thu Sep 19 13:37:58 CEST 2013


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.


2013/9/19 Loïc Hoguin <essen at ninenines.eu>

> How much is a lot of messages?
>
> 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).
>
>
> On 09/19/2013 06:30 AM, akonsu wrote:
>
>> Hello,
>>
>> from the documentation:
>>
>> info(Info, Req, State) -> {ok, Req, State} | {loop, Req, State}| {loop,
>> Req, State, hibernate}
>>
>>
>> in case my handler receives a lot of messages, and they come very often,
>> does a response of the latter form {loop, Req, State, hibernate} save
>> anything? Can hibernating in this case actually hinder performance?
>>
>> thanks
>> Konstantin
>>
>>
>> ______________________________**_________________
>> Extend mailing list
>> Extend at lists.ninenines.eu
>> http://lists.ninenines.eu:81/**listinfo/extend<http://lists.ninenines.eu:81/listinfo/extend>
>>
>>
>
> --
> Loďc Hoguin
> Erlang Cowboy
> Nine Nines
> http://ninenines.eu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ninenines.eu/archives/extend/attachments/20130919/0a4bcb6c/attachment.html>


More information about the Extend mailing list