Open marwie opened 2 weeks ago
About the time — I imagine this comes from the UASTC settings used in optimize
, which are conservative and based on the KTX2 Artist Guide. It's very possible these defaults are too conservative, they are definitely on the slowest end of what the KTX Software UASTC encoder allows.
About the reporting of the time — It's not clear to me what in the output is incorrect, as the snippet above shows 133822ms spent on the UASTC step. Is this a .
vs ,
discrepancy? The CLI is not localized now, but it shouldn't be difficult to use Number.prototype.toLocaleString()
, if that's the issue.
Oh you're right that's it - my bad, that's because of the , where i expected a .
I see! Does 1e6.toLocaleString()
give a .
-separated integer for you, executed in Node.js? I'm not so familiar with localization outside of a browser environment.
It prints 1,000,000
but perhaps because my laptop right now (as well as my workstation) is also set to english
Describe the bug Running
optimize
with the DamagedHelmet GLB from the gltf sample assets repository takes much longer than expected and the CLI output logs that it just took 200 ms.To Reproduce Steps to reproduce the behavior:
gltf-transform optimize --compress draco --texture-compress ktx2 "source/DamagedHelmet/DamagedHelmet.glb" "output/DamagedHelmet/DamagedHelmet.gltf-transform.glb
uastc
for an unexpected long timeExpected behavior Compression doesnt take a minute / the CLI reports the correct duration it took.
Versions:
Additional context
The same happens without
--verbose
I can see multiple KTX processes running that take up 100% of my CPU (which is fine) - it just takes a lot longer than expected.Output
https://github.com/donmccurdy/glTF-Transform/assets/5083203/98ea6ef6-0d5c-4b89-aee7-ee07d16316cf