I guess WWW store the request result as a bytes array internally, and convert it to a string when you access the text
field (is this really a field then ?).
So, no matter what, converting that bytes to string will require to allocate memory and use the proper encoding to process that byte array.
Your best bet is to extract the data directly from the byte array, without converting it to a big string first.
EDIT
Alternatively, you can wrap the byte array in a MemoryStream
, and wrap it again in a StreamReader
with the appropriate encoding (OBJ files are plain ASCII I guess).
Your file is gonna be converted incrementally, as you read it.
Use that yield
pattern in your processing loop, and it should be good !