Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  out function and return values

Guest
Posted: Tue May 27, 2008 7:04 pm Reply with quote
Guest
Hello all,

If we consider the performance (the speed of web page delivery) and the memory consumption, do you recommend to use binary values (or binaries list) instead of string list for the output of the out(Arg) function ?

For example use {html,<<"<html>...">>} instead of {html,"<html>..."} ?


Do you have best pratices guides about Yaws programming ?


Thank you

wde




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
Guest
Posted: Tue May 27, 2008 7:51 pm Reply with quote
Guest
wde@free.fr wrote:
> Hello all,
>
> If we consider the performance (the speed of web page delivery) and the memory
> consumption, do you recommend to use binary values (or binaries list) instead of
> string list for the output of the out(Arg) function ?
>
> For example use {html,<<"<html>...">>} instead of {html,"<html>..."} ?
>

I do. Binaries are great. They work excellent in yaws processes
as well. The only downside of having a system that sends around
a large amount of large binaries is that if some of these binaries
end up being referenced from processes that don run especially often
it can take some time until they are gc'ed - thus this can look like
memory leaks but really aren't - boring though.

This will not happen in the case of yaws procs generating binaries.
Once the proc dies, all refs to the binaries it keeps are decremented.

>
> Do you have best pratices guides about Yaws programming ?
>

Not really - this would be nice to have though.

/klacke

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
timrila
Posted: Sun Jun 10, 2012 6:37 am Reply with quote
User Joined: 28 Mar 2012 Posts: 32
I think your artical is very useful in work and life, I will pay more attention to your blog. Hope that you could post new artical in future.
Soccer Jerseys
Spain Soccer Jersey
Germany Soccer Jersey
Real Madrid Shirt
Soccer Shirts
Real Madrid Jersey
Custom Soccer Jersey
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum