Chromium Weekly 3

一、Change

1.Binding team 2015

Goals:
* more conformant with the spec (Capabilities)
* easier to use (Internal productivity)
* faster (Performance)

Content:
* More conformant with the spec
* Support more IDL features
* Make existing Blink IDLs more conformant

Define good dependency rules among the components

Fig.1.1 The current architecture

Make it much easier and faster to implement chrome/content/ ⇔ Blink interactions

Fig.1.2 The proposed architecture

Reduce the binding overhead

  • Reduce # of CPU instructions in the binding code
  • Remove TryCatch blocks
  • Remove redundant branch conditions

This document proposes a way to re-architect Blink directories and their dependencies after the repository merge and the core-modules componentization. The goal of the re-architecture is to remove unnecessary layering abstractions between Chromium and Blink and make the interaction simpler and faster.


Fig.2.1 The current architecture

Fig.2.2 The proposed architecture

public/web/ contains WebXXX classes exposed from Blink to content/.

public/delegate/ contains WebXXX classes exposed from content/ to Blink.

这两篇说的都是Blink的变化,第一篇更侧重一些Blink内部自身的演变,第二篇更加关注Blink和Chromium的共同演进。Blink的一些变化不可避免的会影响到她的使用者,比如两篇都涉及的Blink的组件化。Webkit大体是清晰的,但是着眼于实现,依赖关系错综复杂,由Webkit而来的Blink可以甩掉一些历史包袱,发力于更好的为Chromium提供服务,和利用Chromium中更多的代码库。

有意思的是,关于Blink组件化采用的方案,选择了不同的答案Fig1.2和Fig2.2。这2个答案haraken@chromium.org应该都知晓的。

二、Design

1.Scheduling JS Timer Execution

Goal
Reduce Jank, input latency and queueing durations by allowing the scheduler to defer javascript timer execution.

Input tasks and (sometimes) compositor tasks are on the critical path for smoothness.
Javascript supports several APIs (setTimeout and setInterval) collectively known as DOMTimers. While these can block the main thread for an arbitrary length of time, this document is focused on fixing problems cause by tasks running at unfortunate times.

对用户输入的响应速度,事关感受上的流畅性。这篇主要就是把Input tasks和Compositor tasks优先级提高,JS Timer放入单独的队列,并对其优先级降低。尽量放在Idle时间来执行它。这个优化主要是针对移动端的。

三、Tips

1. Defining a new attribute for Script tags in chrome

1) src/third_party/WebKit/Source/core/html/HTMLAttributeNames.in
==> added newAttr;

2) src/third_party/WebKit/Source/core/html/HTMLScriptElement.idl
==> added a new field in the HTMLScriptElement interface as below
attribute DOMString new;

2.Tracking slimming paint performance

I’m going to continue manually running cluster telemetry runs on the top 10k pages every morning.

3.Scheduling JS Timer Execution

The chromium side of the Workers needs to live in content/child which isn’t allowed to include files from content/renderer (the reverse is allowed).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值