microsoft / onnxruntime-web-demo

demos to show the capabilities of ONNX Runtime Web
MIT License
172 stars 41 forks source link

Purpose of wrapping the prediction inference call in a setTimeout() and also passing in exactly 10 milliseconds #12

Open jackylu0124 opened 2 years ago

jackylu0124 commented 2 years ago

I have a small question, could anyone please explain to me what's the purpose of wrapping the prediction inference call in a setTimeout() and also passing in exactly 10 milliseconds (and not something like 5 or 15 milliseconds)? Thanks!

https://github.com/microsoft/onnxruntime-web-demo/blob/35239ea55876779fae9829654ce60fb352b252d7/src/components/common/ImageModelUI.vue#L341-L343