[erlang-questions] Cowboy vs Misultin

Andy W. Song wsongcn@REDACTED
Tue May 31 11:48:22 CEST 2011


Do you mean these two?

* L139: binary:match is probably too expensive to simply find byte 255.
* L176: we are constructing a new binary that copies the message to send

I tried to convert the second one to iolist, with no effect. The first one I
didn't change.

All my change to Cowboy is attached in a diff file in my previous post. Can
you cook a new diff that I can apply to your stock version with your
proposed change so that I can try?

Thanks
Andy

On Tue, May 31, 2011 at 5:30 PM, Loïc Hoguin <essen@REDACTED> wrote:

> Hello,
>
> Did you try my proposed changes?
>
> On 05/31/2011 08:18 AM, Andy W. Song wrote:
> > Cowboy can't pass my test this time. Connections start dropping from
> > 20K, don't know why.
>
> Works fine here.
>
Do you mean using my C version client?

>
> I've noted a few more things however:
>
> * Your hibernate call is in the wrong place, it should be right before
> the receive, as there could be more than one frame queued and you'll
> ignore it by hibernating right after the reply to the first frame.
>
I don't think so. If before receive, what parameter do you give hibernate?
And in my test, each connection will receive only one packet in every 5
minutes. So there is no queued up frame at all and that is the reason to use
hibernate.


> * You should use erlang:hibernate, not proc_lib:hibernate, as this
> process isn't started using proc_lib.
>
Tried, no difference.

>
> * If you don't need the HTTP headers or any HTTP stuff from the request
> after socket initialization, you should just remove it from the record.
> Include "cowboy/http.hrl" and change the #http_req contents to remove
> the extra cruft. You'll use less than half you currently use doing this.
>
> --
> Loïc Hoguin
> Dev:Extend
>



-- 
---------------------------------------------------------------
有志者,事竟成,破釜沉舟,百二秦关终属楚
苦心人,天不负,卧薪尝胆,三千越甲可吞吴
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110531/1ee05949/attachment.htm>


More information about the erlang-questions mailing list