Stream allocation creating duplicate copy of data
The DownloadHandlerBuffer implements GetData as a copy operation, so this line is creating two copies of the downloaded model in memory
https://github.com/KhronosGroup/UnityGLTF/blob/21f73d6a68376d22c90cc73fda2a761809a3d30f/UnityGLTF/Assets/UnityGLTF/Scripts/Loader/WebRequestLoader.cs#L65
The documentation for DownloadHandlerBuffer.GetData is here
https://docs.unity3d.com/ScriptReference/Networking.DownloadHandlerBuffer.GetData.html
Thanks for making us aware of this issue - do you have a recommendation for how we can avoid this?
In this case the most straightforward way is to copy the data once:
byte[] downloadedBytes = www.downloadHandler.data;
LoadedStream = new MemoryStream(downloadedBytes, 0, downloadedBytes.Length, true, true);
My colleague is also working on an alternate direct-to-disk implementation of ILoader that can be used to create a file stream and thus avoid download data in memory entirely. If there's interest we can contribute it back when it's ready.
Please update to the latest version and open a new issue if the problem persists. Thanks!