- From: Marcus Geelnard <mage@opera.com>
- Date: Fri, 25 Oct 2013 14:54:55 +0200
- To: robert@ocallahan.org
- CC: Jussi Kalliokoski <jussi.kalliokoski@gmail.com>, Srikumar Karaikudi Subramanian <srikumarks@gmail.com>, s p <sebpiq@gmail.com>, Joseph Berkovitz <joe@noteflight.com>, "public-audio@w3.org" <public-audio@w3.org>
- Message-ID: <526A6A1F.9090606@opera.com>
2013-10-25 14:16, Robert O'Callahan skrev: > On Fri, Oct 25, 2013 at 11:14 AM, Marcus Geelnard <mage@opera.com > <mailto:mage@opera.com>> wrote: > > Yes, you can do pretty evil things with several Web technologies > today. GLSL is one example (I can make the complete UI crash on my > Android phone, and I can make a desktop environment completely > unresponsive). > > > With the state of GPU hardware and drivers today, our only choices are > "don't do 3D on the Web at all" or "accept these potential crashes". > This is not a good situation, and it's not one we want to emulate, and > it is not comparable to what we face with audio. Yes, let's not be THAT bad. On the other hand it's quite a different situation. With GLSL you're more or less sending code across the kernel barrier, as it's executed in one of the most privileged environments on any device (if your code triggers a graphics driver bug, it may block or mess up all graphics operations on that device). With audio, we're talking about executing code in a limited script environment, in a separate thread, in a protected (maybe even sandboxed) process. > > Workers is another example (setting up a dozen of busy workers can > silently drain the battery of a device). I don't see a big > difference in doing a heavy convolution in a native audio node or > a heavy for-loop in a script processor node - both have similar > implications, and similar solutions (validation, watchdog timers > or similar). > > > One potential difference is that browsers already do significant work > to make sure that a busy script can't make the browser unresponsive to > the point the user can't close the offending page. We'll need to > ensure that's still true if that script is running on a high-priority > audio thread. What I meant was that just as you can write a CPU-hungry script node, you can configure a native convolver node to consume lots of CPU. Neither of those should block the main thread, nor otherwise make the system/page unresponsive. So yes, we need to be careful. /Marcus > > Rob > -- > Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny > eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha > iids teoa stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e > tfaokreg iyvoeunr, 'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt > hwea lmka'n? gBoutt uIp waanndt wyeonut thoo mken.o w * > * -- Marcus Geelnard Technical Lead, Mobile Infrastructure Opera Software
Received on Friday, 25 October 2013 12:55:27 UTC