transferIn seems allocate memory each function call, is there any way to reuse it?
My goal is to get lots of data from device, with a dedicated web worker and this advice, performance still not good enough. From performance tab in dev tools, found that the delayed is caused by GC.
Add a comment to https://github.com/WICG/webusb/issues/217 with your observations. The one thing I'm unsure of is whether just reducing buffer allocations will help since there are still other small allocations involved in calling those methods.