Encoding speed issue when using draco_encoder.js in web browser environment.
- Dominant language
- C++
- Stars
- 7.5k
- Forks
- 1.1k
- Avg merge
- 47m
- Merged PRs (30d)
- 1
Description
Hello,
I am currently testing the compression of a specific 3D model using Draco.
Most models are working correctly.
However, when encoding a specific .glb file in the browser using the [draco_encoder.js](https://github.com/google/draco/blob/main/javascript/draco_encoder.js) bundle,
it takes over 4 minutes or freezes.
The same file encodes at a normal speed of about 500ms in the Node.js environment using the [draco_encoder_nodejs.js](https://github.com/google/draco/blob/main/javascript/npm/draco3d/draco_encoder_nodejs.js) bundle.
Why is there a significant difference in encoding time between the web browser environment and the Node.js environment for this specific model?
The model is approximately **13.6MB** and has two geometries.
One of them contains position and normal buffers composed of a **Float32Array with a length of 842,748**.
Could this be affecting the slow encoding in the web browser?
I used the [gltf-transform](https://gltf-transform.dev/) library to conduct the encoding tests in each environment.
Thank you for your response.
Contributor guide
Assessment
This issue has not been assessed yet.