Platform Architecture team snippet

128 views
Skip to first unread message

Kentaro Hara

unread,
Jun 27, 2016, 2:15:08 AM6/27/16
to blink-dev
Hi

haraken@ wrote a roadmap of the arch team for the rest of 2016. We're now building Q3 OKRs based on the project sheet. If you have something you want the arch team to work on, add your ideas to the project sheet :)

Talks we gave at BlinkOn:

- Blink Onion Soup (esprehn@)
- State of Oilpan (keishi@)
- How to WTF::bind pointers (hiroshige@, tzik@)


Memory:

(hajimehoshi) Removing encoded images from PartitionAlloc's SharedBuffer (CL), because we already have the encoded image on Skia's SkRWBuffer. This optimization is going to reduce a significant amount of memory from websites that have many images.

(tasak) Investigating real-world websites to find another sweet spot for memory reduction. tasak@ found that V8's code caching is consuming 8 MB in Gmail. This seems to be purgeable.

(bashi) Landing Memory Coordinator v0 incrementally. Memory Coordinator v0 is going to be just a replacement of the existing memory pressure system. We're aiming at shipping it in Q3.

(tasak) Prototyping the purge + suspend to address all performance/memory/compatibility concerns. Specifically, we're evaluating the following three metrics:

- How much it improves the cost of tab switching.
- How much it reduces renderer's memory.
- How much it breaks websites by suspending.

(keishi) Gave a lightning talk about Oilpan's latest status at BlinkOn.

(bashi) Switching memory.blink_memory_mobile to TBMv2.

(tasak, primiano, petrcermak) Discussing how to upstream the memory visualization tool.

Bindings:

(hlopko) Polished up traceWrapper(). Prototyped incremental marking by inserting write barriers to pointers traced by traceWrapper() and confirmed that it will dramatically reduce pause times of traceWrapper()s.

(yukishiino, haraken) Discussed how to handle script execution on detached iframes (this is causing a lot of crashes today). In conclusion, we decided to 1) guarantee that all scripts run on correct contexts and 2) support full script execution on detached iframes. yukishiino@ is writing a design doc of how to re-architect Blink and V8 APIs.

(yukishiino) Fixed P1 bugs. Both of them are caused by mis-handling of script execution on detached iframes...

(peria, ulan, cbruni, esprehn, jochen) Discussed how to speed up Elliott's parsing benchmark, postMessage, WindowProxy::initialize etc with the V8 team.

(yangguo) Landed necessary V8 APIs to snapshot DOM templates (design doc). The plan is to snapshot DOM templates for window and document and thus make WindowProxy::initialize 2x faster. The remaining part is to implement template snapshotting in the binding layer using the V8 APIs.

Threading:

(hiroshige, tzik) Gave a lightning talk about how to use pointers in WTF::bind at BlinkOn.

(hiroshige, tzik) Landed a lot of changes to clean up pointer types used in WTF::bind. We're getting pretty close to the world described in the above slide :)

(tzik) Making WTF::bind a thin wrapper of base::bind.

Frames:

(haraken, hiroshige, nhiroki) Started a project to tie all tasks/timers with frames. This is necessary to put all tasks/timers to the per-frame scheduler and thus achieve fine-grained, user-level scheduling per frame.

(haraken, tasak) Measured how much time is consumed by long-running scripts in third-party contents. We found that many long-running (>500 ms) scripts are running even on desktops (Linux desktop, Android low-RAM). To make the scripts interruptible, I want to experiment with the idea of the restricted nested message loop, but the per-frame scheduler is mandatory to experiment with it.

Onion Soup:

(esprehn) Gave a talk about Onion Soup at BlinkOn.

(yutak) Finished replacing OwnPtrs with unique_ptrs!!

(yutak) Started looking at how to make WTF::HashMap faster.

(yzshen) Landed a binding between Mojo's map and WTF::HashMap.



--
Kentaro Hara, Tokyo, Japan

Yong Wang

unread,
Jun 28, 2016, 1:42:33 AM6/28/16
to blink-dev
(yangguo) Landed necessary V8 APIs to snapshot DOM templates (design doc). The plan is to snapshot DOM templates for window and document and thus make WindowProxy::initialize 2x faster. The remaining part is to implement template snapshotting in the binding layer using the V8 APIs.
      no permission to open the design doc, could you set it public. 
thanks.

Daniel Cheng

unread,
Jun 28, 2016, 3:41:02 AM6/28/16
to Yong Wang, blink-dev
Another presentation at BlinkOn that might be relevant to the architecture work is Mojo in Blink. Unfortunately, I didn't have time to prepare Blink-specific slides, so I borrowed slides from a previous presentation I gave about reviewing IPC changes. We did talk about some of the things to watch out for when using Mojo in Blink, and reillyg@ has added a bunch of information to https://www.chromium.org/developers/design-documents/mojo/calling-mojo-from-blink about how Oilpan and Mojo interact.

Daniel

Jochen Eisinger

unread,
Jul 6, 2016, 8:03:16 AM7/6/16
to Daniel Cheng, Yong Wang, blink-dev
I copied to design doc to chromium.org so it can be made public: https://docs.google.com/document/d/1NBmPxgkKuipRZFAzq2IQTDM4qzouyIMh_DfqPaIw1hE/edit?usp=sharing

Yang ended up adding the ability to v8::SnapshotCreator to snapshot several contexts (using AddContext) and include v8::Templates in the snapshot (using AddTemplate - external references to callbacks need to be known to the SnapshotCreator class)

v8::Context::FromSnapshot now allows you to specify which context snapshot to use (the external references required for deserialization are pass to V8 via Isolate::CreateParams). ObjectTemplates and FunctionTemplates also have a FromSnapshot method to allow for finding them.
Reply all
Reply to author
Forward
0 new messages