Scheduler looping with postMessage

11 views
Skip to first unread message

secretrobotron

unread,
Nov 23, 2011, 5:08:43 PM11/23/11
to paladin-dev
Alan and I talked a lot about how to spin the scheduler on task in the
Gladius scheduler, and found a hack someone discussed on a blog about
using postMessage to run faster than setTimeout(0).

We've asked a couple of browser devs here at Mozilla about it before,
but in the interest of getting the Gladius renderer right, I asked
Ehsan about this hack. He suggested posting to dev.platform.

I did so just now. It's taking a while to produce results on the
group, so look for "Looping Too Fast with postMessage" soon.

David Humphrey

unread,
Nov 23, 2011, 5:11:58 PM11/23/11
to palad...@googlegroups.com
You want to talk to David Baron (dbaron) and Boris (bz) about this:

http://dbaron.org/log/20100309-faster-timeouts

When we tried this for Processing.js we found that we could starve the
main thread with too many updates. I'd say do some solid testing before
you adopt this approach. Also talk to yury in the processsing.js
channel, as he did this research for us a year back for pjs.

Dave

Secret Robotron

unread,
Nov 23, 2011, 5:14:41 PM11/23/11
to palad...@googlegroups.com
This is exactly where we got the information to use the postMessage approach. I'll mention it in the thread when it appears.

secretrobotron

unread,
Nov 23, 2011, 5:32:23 PM11/23/11
to paladin-dev

David Humphrey

unread,
Nov 23, 2011, 5:33:10 PM11/23/11
to palad...@googlegroups.com
Doing posts to dev.platform is smart. You'll get a response, I suspect,
and if you don't, we'll do some targeted irc work...

dave

Reply all
Reply to author
Forward
0 new messages