http://qs1969.pair.com?node_id=277901


in reply to Re: Re: append to a string or make an array? (memory and time efficiency)
in thread append to a string or make an array? (memory and time efficiency)

Thanks for your help Broswer and Abigail.

You are correct, I don't need to re-join the strings at the end, I would just modify my server to transmit each chunk in the array. However, I have no idea how long it'll take to send 5 chunks vs. 1, so the join may or may not be fair.

Since my server is single threaded, I'll modify it to have the current user's output buffer a global variable. Any methods which produce output can just tack their output onto there (without any need for passing strings or even string references among subroutines).