5 ms·
I agree, once browser get a good grip on CPU parallelism things will probably be all downhill from there.
by ateesdalejr 9y ago
I agree, once browser get a good grip on CPU parallelism things will probably be all downhill from there.
- mark-r 9y agoHow many threads do you think the browsers will allow on a single page?
- BatFastard 9y agoAs many as is needed. And as many processors as are needed. As someone who writes browser based 3D games, I need more power!
- meritt 9y agoOut of curiosity, what technologies are you leveraging to write browser-based 3D games? Lightweight WebGL libraries, something higher-level like Unity, or something else entirely?
- BatFastard 9y agoRolling my own graphics engine (ugh!) to create a voxel octree platform. Front end uses C++ to Webassembly for the engine core and Typescript for the UX. Backend uses Java with a MSOA. All using a reactive message system.
- solarkraft 9y agoA web page should probably not be allowed to use unlimited amounts of computing power without asking for permission first.
- elcritch 9y agoWe need this!
- 0xfeba 9y agoeg coinhive
- marcosdumay 9y agoI don't see why the foreground web page shouldn't have as much access to my desktop's CPU as any native program.
- ateesdalejr 9y agoI agree! Like 0xfeba pointed out, really annoying things like coinhive could eat all your CPU if no permission was required. Some sort of web API that tells the browser how many threads it can allocate for rendering and code execution. If the thread count exceeds a configured maximum the browser can ask the user for permission.
- badsectoracula 9y agoI don't think it'll go that way, i remember when web workers first came out i wrote a simple raytracer with some GI and optionally used web workers if available for multiple threads. It worked fine until some browser updates later that limited the amount of web workers pages could use (or the amount of time each worker got, i don't remember, it has been a few years) making the web worker version have pretty much the same speed as the regular version.
- BatFastard 9y agoThat is disappointing to hear, I am hoping webassembly will loosen that back up a bit.
- deleted 9y ago[deleted]
- fulafel 9y agoCurrently quite a lot, more than 10 with the current stable Firefox release, here's a test page: http://pmav.eu/stuff/javascript-webworkers/ http://pmav.eu/stuff/javascript-webworkers/ (Web workers are around since ca. 2010 so this is not very new)
- imtringued 9y agoDo they require you to serialise data to strings or is it possible to transmit typed arrays?
- fulafel 9y agoThere is support for efficiently passing data around. You can directly get binary typed arrays from XmlHttpRequest without intermediate processing, and you can pass them around without memory copies to WebWorkers using Transferables. More recently you have shared typed arrays that work like shared memory between threads (as of Safari 10.1 / Chrome 60, Firefox too)