3 ms·
It's the usual story with web APIs, the implementation probably has resource quotas to keep applications from accidentally or deliberately doing denial of servi
by jsheard 4y ago
It's the usual story with web APIs, the implementation probably has resource quotas to keep applications from accidentally or deliberately doing denial of service, but you the developer targeting that implementation aren't allowed to know what the quotas are. You just have to make an educated guess at how much you can get away with and hope for the best. WebAssembly has a similar issue where consuming too much memory will get your app killed, but there's no reliable way to know how much is "too much" until it's too late to recover.
- ben-schaaf 4y agoThere are some limits you can query from the adapter: https://developer.mozilla.org/en-US/docs/Web/API/GPUSupportedLimits https://developer.mozilla.org/en-US/docs/Web/API/GPUSupporte...
- jsheard 4y agoThose limits only tell you how big each individual GPU allocation can be, not how much you can allocate total before the browser puts a bullet in your context.
- codedokode 4y agoBased on previous experience I assume there are no quotas and the webpage can hang your system. I had Google Street View hang a whole Linux system by using too much memory and Firefox did nothing to prevent this.
- BlueTemplar 4y agoWhat if you are using it in a native app rather than a browser/Electron ?