|
I'm moving a multiplayer application of mine from XNA over to Unity so that I can make use of the web player. To make things work with the Web Player, it seems I have to use the WWW class instead of HttpWebRequest. My tests are showing that accessing the exact same page from a Unity application takes 10 times longer using WWW than it does using HttpWebRequest. Is that to be expected? Is there anything I can do to improve WWW's performance? In my specific case, the WWW request takes about 450 ms (around half a second) to fully execute, while the HttpWebRequest is taking 47 ms - less than half of a tenth of a second!
(comments are locked)
|
|
WWW is also encoding the download into proper objects - are you accounting for the post-download initialization in your comparison? Is there any way to avoid the encoding/processing? It appears WWW is pretty inefficient.
Sep 20 '11 at 12:55 PM
mikeytrw
(comments are locked)
|
|
I've had some success increasing WWW request performance by building the POST data myself rather than using the WWWForm object: Also, I suspect the additional time for a WWW request is because it has to load the crossdomain.xml for every request which is pretty annoying.
(comments are locked)
|
