This was a great example and great find! After talking with Brian, I've opened Rust issue 9831 (https://github.com/mozilla/rust/issues/9831 ) to track the scheduler changes to make this code work.
What we can do in Servo right now is to start from a normal task instead and spawn the constellation from there, spawning the special compositor thread separately (instead of as the root task). We believe that should work around the problem. The reason we get any parallelism with code running inside an iframe is that the task creation stuff I added to handle supervision and unlink failure also caused those to get run on a separate scheduler instead of blocking inside of the root scheduler associated with the main task. On Oct 11, 2013, at 11:58 PM, Ilyong Cho <[email protected]> wrote: > FWIW The benchmark that I've done shows that there is no performance win by > spawning multiple tasks when top level task was started by > `start_on_main_thread()`: > https://gist.github.com/ILyoan/6945608 > > The output of the test implies spawning multi tasks from top level task > started on main thread doesn't exploits multi cores, but normal started > test shows performance improvement. > > Not sure but I tentatively belive that similar phenomena arise on servo as > well. > > Thanks, > Ilyong > _______________________________________________ > dev-servo mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-servo _______________________________________________ dev-servo mailing list [email protected] https://lists.mozilla.org/listinfo/dev-servo

