meemoo hackable web apps

multithreaded javascript?

28 Sep 2011 by Forrest Oliphant

When first designing the video remix version of Meemoo, I put the video players in an iframe page, separate from the main application. This made it possible to "pop-out" the players to be shown on a projector. The communication between the app and the players happens with window.postMessage(). This is how the new framework works as well: iframes communicating with postMessage.

blocking module
blocking module

At first I thought that this would have the added benefit of running the JavaScript of each module in a separate thread, but it turns out that it only works like this in Opera. I made a test by adding a module with a blocking script. In all browsers except Opera, pressing the button stops the processing and glitch modules. Unfortunately, Opera's JavaScript performance is noticably chunkier than the primary browsers that I'm testing: Chrome, Firefox, and Safari.

I wonder if window.open() windows run in separate threads. This is worth a test.

 

Discussion

comments powered by Disqus