Open Bug 1188277 Opened 10 years ago Updated 5 months ago

Implement off-main-thread Layout (frame construction and reflow)

Categories

(Core :: Layout, task)

task

Tracking

()

People

(Reporter: kanru, Unassigned)

Details

Rationale: multi-core devices are becoming more common. JavaScript on main-thread often has to compete CPU time with layout & rendering. To improve app startup / first page load speed. Approach: move layout to per-document thread with following conditions, 1) Any modification to DOM is blocked by the Layout thread. Every ContentInserted, ContentAppended and ContentRemoved notification has to wait the layout thread finishes its previous task. 2) Any modification to Style is also blocked by the Layout thread. 3) Any scripts that triggers synchronous reflow (eg. read clientWidth) should also be blocked. 4) When Layout thread has to use objects on the main thread, it should do it synchronously. For example, post a task to the main thread and wait until the task signals it's finished. In order to avoid dead lock, main thread will always execute the layout task even if it's blocked. In the future we could remove the dependency between layout and main thread iteratively and loose above conditions.
Type: defect → task

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: kanru → nobody
Severity: normal → S3

Should we just close this?

You need to log in before you can comment on or make changes to this bug.