When I tried to load an STL ASCII file with STLLoader the first time I wondered why the parsing took such a veeeeery long time.
The reason is quite obvious:
Because of FileLoader’s response type being set in line 48 of STLLoader.js FileLoader loads the file into an ArrayBuffer, even if it is ASCII, so that it has to be reconverted into text by STLLoader’s ensureString function.
On my machine this reconverting takes about 12 additional seconds on Chrome and about 6 seconds on Firefox for a 40MB file.
If I have such an ASCII file and remove
setResponseType('arraybuffer') on trial, the file is parsed directly and relatively quickly (about 2-3 seconds).