[erlang-questions] Slow UTP packets

Bengt Kleberg bengt.kleberg@REDACTED
Thu Jul 30 15:54:41 CEST 2009


Greetings,

To format beore writing taker a look at io_lib:format/2
(http://erlang.org/doc/man/io_lib.html). It handles formatting like
io:fwrite/2, but returns an iolist instead of writing to an IO object. 


bengt

On Thu, 2009-07-30 at 16:23 +0300, Ovidiu Deac wrote:
> Thanks!
> 
> Indeed switching to file:write fixed the problem.
> 
> But what is the explanation for the fact that the output slows during
> runtime? Is it a bug?
> 
> Still I would like to write text files where the lines are formatted
> using ~p style. How can I do that fast?
> 
> On Thu, Jul 30, 2009 at 3:58 PM, Rob Elsner<thatsnotright@REDACTED> wrote:
> > I am doing nearly an identical thing and record a 35Mbps multicast UDP
> > stream (~4MB/s) just fine.  The difference is I don't use io:write, I
> > use file:write.  I've had the file in raw mode and that works as well.
> >  I also use delayed_write, but in either case it works fine.
> >
> > I think you might be hitting an issue using io:write.  Is there a
> > chance you can use file:write and see how that performs?
> >
> > Rob
> >
> > On Thu, Jul 30, 2009 at 6:29 AM, Ovidiu Deac<ovidiudeac@REDACTED> wrote:
> >> Hi everybody,
> >>
> >> I want to do some speed tests for parsing packets and I wrote a small
> >> program which receives data on a multicast address and writes it to a
> >> file. While this application is running I measure the growing speed of
> >> the output file to get an idea about the speed.
> >
> 
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
> 



More information about the erlang-questions mailing list