Skip to content

Faster task scheduler

Choose a tag to compare

@Gozala Gozala released this 19 Apr 21:28
· 55 commits to master since this release
6b2d5cf

This version introduced performance optimizations:

  1. Now Task scheduler is no longer implemented in pure functional style as number of allocations caused by it was in top 5 for browser.html code base. Instead now forking a task creates a mutable Process instance that attempts to do almost no allocations while stepping through tasks.
  2. Several code paths used try / finally blocks which hit unoptimized path on spider-monkey. Use of try / catch on the other hand is optimized, there for with this change we should hit the optimized path.

Breaking API changes

  1. Now Task.create is deprecated in favor of new Task
  2. Task.fork(task) now returns Process instance (it used return void)
  3. Now execute in new Task(execute) may return an abort function which scheduler may use to abort running task.