- Home /
Loading a XML file via WWW is slow, How can I make it faster?
Below is my code.
WWW w = new WWW(someAdress + "Content.xml"); yield return w;
and it takes more time than I imagine. it takes almost 1 second, while much bigger image file takes alot less time to download.
i can't understand what makes downloaing a xml file is slower than downloading a image file.
i suspect www is doing somekind of reading whole texts beside just downloading it.
if someone knows anything make it faster, please reply it. or if it it is impossible, please tell me what is reason of slow speed.
also, i wonder that
xDoc.LoadXml(w.text);
code make it faster, like loading images using formmated file or turn off unnecessary options.
Server-side issue, I guess. WWW downloads everything as binary, therefore the file type doesn't matter.
Answer by hvilela · Oct 18, 2012 at 04:04 AM
You can reduce your xml size by removing empty spaces, renaming long named tags by short ones and even compress it (aka zip/rar) and decompress when it's finish loading. (this last option it'll require a lib).
Your answer
Follow this Question
Related Questions
Returning correct result after uploading 0 Answers
www.texture textureType to GUI 0 Answers
Difference in downloaded www.byte.length on iOS vs PC 1 Answer
Downloading files with Git 0 Answers
few questions about using www for getting bunch of images... 0 Answers