I have noticed that serving large web pages over the WWW class in a webplayer game becomes extremely slow.
I use the server to send custom assets as xml and sometimes they can take a few MB or even several hundred MB. The bandwidth starts high and decreases over time as CPU increases (even though I do nothing but yield for the WWW object to finish. It looks exactly as if Unity was doing something like this:
while (isThereMoreData)
{
Download a bit of xml data
WWW.text += aBitMoreText;
}
Which, on large text data, would end up getting the text buffer moved and copied in memory as its size increases…
I have checked my http headers and they indicate the content size correctly, which means that the WWW object could pre-allocate the memory buffer.
Has anyone else experienced this and found a work around?