Platform Architecture Team snippet

46 views
Skip to first unread message

Kentaro Hara

unread,
Mar 16, 2018, 12:25:03 PM3/16/18
to platform-architecture-dev, blink-dev
Hi

Memory:

(hajimehoshi) Finally landed a memory leak fix for Autofil. This fixed memory leaks that were happening on 4.2% of the top 10k real-world websites! The fix itself was not complex but we couldn't land it quickly because it had a risk of regressing loading performance. We ran a Finch experiment and confirmed that there's no performance regression.

(yuzus) Shipped the real-world memory leak detector to the main waterfall (FYI bot). The leak detector is also running on Cluster Telemetry against the top 10k websites. yuzus@ fixed a couple of false-positive leaks (e.g., ResourceFetcher) and stabilized the result. yuzus@ is working with the infra team to bring the leak detector to CQ.

(mlippautz, keishi) Pushing Oilpan's incremental GC forward. It's mostly working in terms of correctness but the performance is challenging. Thinking about introducing a concurrent marking to reduce the period where write barriers need to be enabled.

(yuzus, tasak) Started prototyping a near-OOM intervention v1. i.e., drop all cross-origin iframes when renderer's memory usage reaches some threshold. According to tasak's experiment, it looks like this will drop 20 - 30 MB from many websites.

(tasak) Investigated how much lazy loading improves memory, responsiveness and startup on Android Go. It looks like that the impact on memory is limited but there will be a big impact on startup time (and probably on responsiveness in a loading phase).

(tasak, keishi) Did a lot of study on memory UKMs on desktops.

(dskiba) dskiba@ noticed that critical memory pressure signals are not working as expected on Android. Fixing.

(bbudge) To harden security of ArrayBuffers, bbudge@ is trying to create a separate ArrayBuffer partition per SecurityOrigin. The CL was landed but reverted because it caused a performance regression.


Bindings:

(peria) Finished shipping the V8 context snapshot on desktop. It improved a frame creation time by 36% at 95%-tile. This is a huge win! peria@ is working on shipping it on Android.

(yukishiino) Fixed a lot of bugs related to the wrapper lifetime of callback functions / interfaces, including a P0 bug of Geolocation. What we realized is: the wrapper tracing is sometimes not sufficient to represent the lifetime relationship of V8 wrappers (the lifetime is much more complex than we imagined when we designed the wrapper tracing). The unified GC is mandatory to get it right.

(hpayer, mlippautz, haraken, keishi) Discussed ways to implement and ship the unified GC. Performance is going to be a big challenge but we now have a very clear roadmap.

(peria) Making ScriptState GarbageCollected. This is needed for the unified GC.

(yangguo, haraken) Recently there were a couple of requests to support v8::TerminationExecution (i.e., forcibly terminate a long-running script) in Blink. Headless Chrome and DevTools want the mechanism. However, the problem is that Blink cannot simply support v8::TerminationExecution because exceptions thrown by V8 APIs are not always gracefully handled in Blink. Yang and I came up with an idea to solve the problem (design doc).

(lfg, adithya) Optimizing against Speedometer 2.0 to address all Blink-side low-hanging fruits. Investigating how to reduce # of layouts in the inferno benchmark.

(luoe) Introducing [Affect=Nothing] to annotate IDL attributes / operations that don't have any JS side effect.

(haraken) Investigated the binary size breakdown of Blink. Auto-generated binding code is consuming 2 MB (which corresponds to 5% of Android Chrome's binary) and it may be worth looking into what we can reduce from there.


Scheduling:

(sami, altimin, haraken, tasak, yutak, hajimehosi, yuzus, tzik) Had a scheduling summit in Tokyo (Meeting notes (Google-internal)). Built a joint 2018 OKRs.

(tzik) Sent an Intent-to-implement for the cooperative scheduling. Started implementing.

(tzik) Published a design doc to make v8::Microtask queues spec-conformant. This is necessary to make the cooperative scheduling work correctly.

(hajimehoshi) Moved a lot of tasks to the per-frame scheduler. From the execution time perspective, now 96% of the tasks are under control of the per-frame scheduler! This also cleaned up the code base; i.e., the default loading task runner is gone. The default timer task runner is gone. WTF::Timer is gone (WTF::Timers are replaced with TaskRunnerTimer).

(altimin, haraken) Published a plan for Scheduling Architecture 2.0. This will remove a bunch of abstraction layers from Blink Scheduler.

(altimin) Implementing the worker task throttling. Landed the base architecture (e.g., WorkerSchedulerProxy) and supported it on dedicated workers.

(yutak) Removed WebTaskRunner! Now you can use base::SingleThreadTaskRunner everywhere :)

(yutak) Replaced WebViewScheduler with PageScheduler.


Onion Soup:

(jbroman, haraken) Jeremy's team is going to take over Onion Soup. haraken wrote a doc to capture all code architecture projects in Blink.

(jbroman) Mojofying Android Java - V8 bindings.

(lucmult) Remove PtrUtils.h.


(Note: This is not a complete list of arch team's achievements. This is just a list of arch team's achievements haraken@ is aware of and other team's achievements closely related to the arch team. Feel free to add more by replying to this thread.)


--
Kentaro Hara, Tokyo, Japan
Reply all
Reply to author
Forward
0 new messages