-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - gltf: load textures asynchronously using io task pool #1767
Conversation
not sure how to make that works on wasm... |
27552c2
to
f3c2724
Compare
I sidestepped the wasm multithread issue (aka no multithread in wasm) by ... staying single threaded in wasm and choosing which to execute with a |
I don't know if it's of any help, but did you already read this? |
single threaded behavior for wasm
ef397e5
to
66b4849
Compare
on my laptop, loading
With this PR, 2.7 seconds:
We can see that two threads are doing the work. |
why this can't work in wasm and need the workaround of not using the task pool: #1924 |
Cool this seems like the right approach for now. I added a quick TODO to remind us to unify impls when we can. |
bors r+ |
While trying to reduce load time of gltf files, I noticed most of the loading time is spent transforming bytes into an actual texture. This PR add asynchronously loading for them using io task pool in gltf loader. It reduces loading of a large glb file from 15 seconds to 6~8 on my laptop To allow asynchronous tasks in an asset loader, I added a reference to the task pool from the asset server in the load context, which I can use later in the loader. Co-authored-by: Carter Anderson <mcanders1@gmail.com>
Pull request successfully merged into main. Build succeeded: |
While trying to reduce load time of gltf files, I noticed most of the loading time is spent transforming bytes into an actual texture. This PR add asynchronously loading for them using io task pool in gltf loader. It reduces loading of a large glb file from 15 seconds to 6~8 on my laptop To allow asynchronous tasks in an asset loader, I added a reference to the task pool from the asset server in the load context, which I can use later in the loader. Co-authored-by: Carter Anderson <mcanders1@gmail.com>
While trying to reduce load time of gltf files, I noticed most of the loading time is spent transforming bytes into an actual texture. This PR add asynchronously loading for them using io task pool in gltf loader. It reduces loading of a large glb file from 15 seconds to 6~8 on my laptop To allow asynchronous tasks in an asset loader, I added a reference to the task pool from the asset server in the load context, which I can use later in the loader. Co-authored-by: Carter Anderson <mcanders1@gmail.com>
While trying to reduce load time of gltf files, I noticed most of the loading time is spent transforming bytes into an actual texture.
This PR add asynchronously loading for them using io task pool in gltf loader. It reduces loading of a large glb file from 15 seconds to 6~8 on my laptop
To allow asynchronous tasks in an asset loader, I added a reference to the task pool from the asset server in the load context, which I can use later in the loader.