mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
Page:
Whistler FFOS
Pages
Adding a new WebIDL binding
Alternative Logo Proposals and Related Swag
Asynchronous WebAssembly compilation project
Austin Oxidation
Autogeneration of style structs
Basic SVG support project
Beginner's guide to rebasing and squashing
Benchmarking
Benchmarks
Bots
Browser Engine Research
Build Errors FAQ
Buildbot administration
Building for Android
Building for Magic Leap
Building for UWP
Building on ARM desktop Linux
Building
CI Services we use
CSS parse error reporting
CSSOM student project
Canvas rendering project
Cargo upgrade service project
Code rust concurrency
Code Review
Code of Conduct
Coding standards
Compiler upgrade recipes
Compositor Layer Design
Contributing
Control Servo using WebDriver
Creating and viewing WARC web archives in Servo
Creating new OpenSSL Windows binary distributions
Cross compiling from linux to mac
Crowbot
Css selector matching meeting 2013 07 19
DOM Design
DOM documentation
DOM missing pieces
Debugging JS web compat issues
Debugging and editing tools
Debugging
Design
Developer tools student project
Devtools CSS errors
Devtools plans
Devtools
Diagnosing SpiderMonkey JIT issues
Eric Atkinson visit 2013 09 10
Events and sundry
Expand HTTP request response monitoring
Fetch improvement project
Firefox Reality release notes
FirefoxReality build
Firewall setup for servo master1
Focus student project
Form validation student project
GSoC project brainstorming
Garbage collected DOM
Getting started with layout
GitHub Labels
Github & Critic PR handling 101
Github workflow
Glossary
Governance
Graphics toolkit integration
HTML parser improvement project
HTMLElement binding conversion
HTTP archive support project
HTTP library requirements
Hawaii Rooting
High priority content for layout
Highfive
HoloLens 2 test plan
Home
How to generate GStreamer binaries for CI
Image load conformance student project
Image maps project
Implement HTML charset parsing project
Implement ImageBitmap project
Implement missing WebAudio automation student project
Implement support for missing XMLHttpRequest APIs
Implement worker modules
Implementing a web standard (RGSoC)
Improve specification conformance of unicode bidi library
Incremental flow tree construction
Infrastructure
Integrate xml5ever
Intern project brainstorming
Intern projects
JS objects, wrappers, and cross origin concerns 2013 08 07
Layout 2020
Layout Overview
Layout resources
Layout revamp ideas
Leo meyerovich visit 2013 07 22
Linux sandboxing
London Oxidation
London Security
Meeting 2014 10 27
Meeting 2014 12 08
Meeting 2012 02 08
Meeting 2012 02 16
Meeting 2012 07 20
Meeting 2013 04 01
Meeting 2013 04 15
Meeting 2013 04 22
Meeting 2013 04 29
Meeting 2013 05 06
Meeting 2013 05 13
Meeting 2013 05 20
Meeting 2013 06 03
Meeting 2013 06 10
Meeting 2013 06 14
Meeting 2013 06 17
Meeting 2013 06 24
Meeting 2013 07 01
Meeting 2013 07 15
Meeting 2013 07 22
Meeting 2013 07 29
Meeting 2013 08 05
Meeting 2013 08 12
Meeting 2013 08 19
Meeting 2013 09 09
Meeting 2013 09 16
Meeting 2013 09 23
Meeting 2013 09 30
Meeting 2013 10 14
Meeting 2013 10 21
Meeting 2013 10 28
Meeting 2013 11 04
Meeting 2013 11 18
Meeting 2013 11 25
Meeting 2013 12 02
Meeting 2013 12 09
Meeting 2013 12 16
Meeting 2014 01 06
Meeting 2014 01 13
Meeting 2014 01 21
Meeting 2014 01 27
Meeting 2014 02 03
Meeting 2014 02 10
Meeting 2014 02 24
Meeting 2014 03 10
Meeting 2014 03 17
Meeting 2014 03 24
Meeting 2014 03 31
Meeting 2014 04 07
Meeting 2014 04 14
Meeting 2014 04 21
Meeting 2014 04 28
Meeting 2014 05 05
Meeting 2014 05 13
Meeting 2014 05 19
Meeting 2014 06 09
Meeting 2014 06 17
Meeting 2014 06 23
Meeting 2014 06 30
Meeting 2014 07 07
Meeting 2014 07 14
Meeting 2014 07 21
Meeting 2014 07 29
Meeting 2014 08 04
Meeting 2014 08 11
Meeting 2014 08 12
Meeting 2014 08 18
Meeting 2014 08 25
Meeting 2014 09 08
Meeting 2014 09 15
Meeting 2014 09 22
Meeting 2014 09 29
Meeting 2014 10 06
Meeting 2014 10 13
Meeting 2014 10 20
Meeting 2014 11 10
Meeting 2014 11 17
Meeting 2014 11 24
Meeting 2014 12 15
Meeting 2015 01 05
Meeting 2015 01 12
Meeting 2015 01 26
Meeting 2015 02 09
Meeting 2015 02 23
Meeting 2015 03 02
Meeting 2015 03 16
Meeting 2015 03 30
Meeting 2015 04 06
Meeting 2015 04 13
Meeting 2015 04 27
Meeting 2015 05 04
Meeting 2015 05 11
Meeting 2015 05 18
Meeting 2015 06 01
Meeting 2015 06 08
Meeting 2015 06 15
Meeting 2015 07 06
Meeting 2015 07 13
Meeting 2015 07 27
Meeting 2015 08 10
Meeting 2015 08 17
Meeting 2015 08 24
Meeting 2015 08 31
Meeting 2015 09 14
Meeting 2015 09 21
Meeting 2015 09 28
Meeting 2015 10 05
Meeting 2015 10 12
Meeting 2015 10 19
Meeting 2015 10 26
Meeting 2015 11 02
Meeting 2015 11 09
Meeting 2015 11 16
Meeting 2015 11 30
Meeting 2016 01 04
Meeting 2016 01 11
Meeting 2016 01 25
Meeting 2016 02 01
Meeting 2016 02 08
Meeting 2016 02 22
Meeting 2016 03 07
Meeting 2016 03 21
Meeting Devtools Servo 2
Meetings
Microdata project
Minutes Hackathon 2012 03 27
Missing DOM features project
More ServiceWorker support project
More developer tools student project
Mozlandia Automation
Mozlandia B2S
Mozlandia JS
Mozlandia Rust In Gecko
Mozlandia WPT
Mozlandia gfx
Mozlando Devtools Servo
Mozlando Oxidation
Mozlando SM Servo
Mozlando Servo Bluetooth
Mozlando Servo MagicDOM
Mozlando Servo SMStrings
Mutation observer project
Mutation testing project
NCSU student projects
Network security project
Off main thread HTML parsing project
Offscreen canvas improvements project
Offscreen canvas project
Orlando Oxidation 2018
Oxidation 2015 11 05
Persistent sessions student project
Preparing ARM libraries for CI
Priority of CSS properties
Priority of DOM implementation
Priority of dom bindings
Private browsing student project
Profiling
Project proposal deadlines
Prototype JS form controls student project
Prototype ways of splitting the script crate
Publishing a new ANGLE NuGet version
Publishing a new app store release
Push vs Pull for caching
Random web content project
Refactor GLES2 student project
Refactor bluetooth support student project
Remaining work
Removing push notifications from IRC hooks
Replace C libraries student project
Report new contributors project
Representation of computed style
Research
Reviewer
Roadmap
Running Web Platform Tests on Servo
Rust HTML parser
Rust SpiderMonkey debugger API
Rust cssparser code walk 2013 08 02
SaltStack Administration
San Francisco Oxidation
Servo Benchmarking Report (December 2024)
Servo Benchmarking Report (November 2024)
Servo Benchmarking Report (October 2024)
Servo Layout Engines Report
Servo and SpiderMonkey Report
Servo for Gecko Developers
Specification Links
SpiderMonkey related tasks
SpiderMonkey infodump
SpiderMonkey upgrade details
Storage student project
Streaming webassembly student project
Strings
Student project brainstorm
Student projects
Styling overview
Stylo hacking guide
Summer of Code 2014: Implement XMLHttpRequest
Summer of Code 2016: Fetch API
Summer of Code 2016: File support
Summer of Code 2016: ServiceWorker infrastructure
Summer of Code projects
Summit meeting 2013 09 09
Support WebDriver based tests project
Syncing web platform tests (WPT)
TaskCluster
Testing
Tools
Tracking intermittent failures over time project
Transcription Notes from Servo Architecture talk in Suwon
Transcription notes from rust patterns talk in suwon
Transcription parallelism
Transcription rust concurrency
Transcription rust runtime
Transription layout and acid2
Trinity College Dublin student projects
UPenn student projects
Updating the Rust compiler used by Servo
Upgrading non taskcluster linux CI machines
Upgrading the UWP gstreamer binaries
Upgrading the windows LLVM binaries
Upgrading wptrunner
Using DOM types
Using Rust Spidermonkey Prototype
Using WebWorker Prototype
Version 0.1
Videos and presentations
WebAudio JS interfaces student project
WebAudio nodes student project
WebCompatBug
WebSocket student project
Webdriver student project
Webdriver tests student project
Webrender Overview
Whistler 2019 notes
Whistler Bugzilla
Whistler FFOS
Whistler GFX
Whistler Houdini1
Whistler Houdini2
Whistler Necko
Whistler Oxidation 2019
Work items for new contributors
Workweek COW DOM
Workweek alt js
Workweek android arm
Workweek boot 2 servo
Workweek compiler lints
Workweek displaylist
Workweek dogfooding
Workweek encoding
Workweek generated content
Workweek governance
Workweek graphics stack
Workweek graphics toolkit
Workweek incremental layout
Workweek js bindings status
Workweek layers
Workweek layers2
Workweek pixels
Workweek rasterization
Workweek reftests
Workweek roadmap
Workweek script crate
Workweek security
Workweek string interning
Workweek tables
Workweek writing modes
XML parser student project
infra triage notes
jQuery status
webxr.today support
Clone
1
Whistler FFOS
Lars Bergstrom edited this page 2015-06-26 17:28:56 -07:00
Agenda
- Sony Z3C support
- Gaia V3 arch changes
- Security model
- Raw Rust vs. other hosting API support
TODOs
Maybe meet with the SM team more with mwu and pcwalton on more exact rooting and the DOM-in-JS direction work.
Sony Z3C
- larsberg: What is missing?
- mwu: Should just work, except for the audio stuff. May need to rewrite some of the h/w integration features for things like touch events.
Gaia V3 architecture stuff
- gabriele: new gaia architecture changes are about separating frontend & backend (leverages serviceworkers). Should have one behind each application for data-related stuff. How does manipulating the DOM from a non-domain thread work in Servo?
- larsberg: not allowed by spec
- gabriele: just want to be able to do some stuff like reflecting sizes
- pcwalton: can do in an iframe right now (if cross domain or sandboxes). Could extend to serviceworker. But, want to get buy-in from other browser vendors, etc. DOM in other threads is a major change
- gabriele: probably do just want a separate document in a thread; that's fine. Having different pages in each separate component in the apps is the new architectural design.
- jack: We like multiple sandboxed iframes.
- pcwalton: Can experiment with that right now to see if it works. Could even polyfill fake ServiceWorker as an iframe.
- gabriele: Good; still trying to get quad-core working a lot better. Constrained memory-wise, though.
- pcwalton: Memory bus is a bigger issue for us than total memory size right now in Servo, though of course there's still more stuff to tune.
Security model changes
- hylands: Customizer can inject stuff into running apps. Had to make changes to allow that to happen, turning off some of the security stuff to prevent that from happening.
- jack: Little bit scary...
Raw Rust vs. other hosting API
- mwu: Don't think CEF makes sense; there's tons of low-level things we only want to do on Gonk (e.g., hardware composition). Take the layer tree and figure out which are the biggest, send them to the h/w compositor, and that will come back and say that it can only do some of them and you have to do the rest. These low-level details only make sense on Gonk.
- pcwalton: Generally advocating getting rid of everything but CEF, but I am mainly concerned about navigation. For graphics, whatever unstable stuff is fine.
- jack: I don't think it makes sense for a Rust program to call the CEF C ABI then back to Rust!
- mwu: How much would we use? Gaia's going to hide everything. CEF makes no sense.
- pcwalton: Just use the simple "start a fullscreen browser."
- jack: Should just use a rust API.
- larsberg: We have one - the Browser interface!
- pcwalton: I just don't want two divergent APIs.
- larsberg: That's how it's all set up today.
Layers
- pcwalton: May want a layers backend for the h/w compositor. Much simpler! Only two operations right now.
- mwu: Superset of OpenGL compositing.
- pcwalton: Just add render_b2g.rs.
- jack: It's like 5-line shaders.
- mwu: Just bringing this up because it has to be done later, but not now.
- gabrielle: There are some layer workarounds in Gonk today...
- pcwalton: Android, too.
- mwu: Drivers are getting better over time. Gonk port also supports KitKat+. It's mainly G and I series that were bad. G was a total nightmare.
DOM stuff for speedups
- mwu: Want to implement "magic DOM objects." Today, DOM's simple like other browsers, but with more safety (because the reflector owns the DOM object). Otherwise, no significant improvements.
- mwu: I want to take the struct with the fields you want, wrap it in a magic macro that transforms the size of the DOM struct to zero. Then, the fields instead reach into the reflector and into the reserved slots, and BOOM!
- pcwalton: We called this "fused" DOM objects.
- mwu: That was in-place allocation of the structs. Different! This stores fields in the JS objects. You want to use that instead of native fields in the DOM object because if they're in the reserved slots you can configured the bindings to go to the slots. So, instead of going to native code, just grab straight from the slot.
- pcwalton: JIT?
- mwu: Yup, works automatically! The macros would map fields to indexes.
- jack: How does this relate to eager reflectors (like Servo) vs. lazy reflectors (like Gecko).
- till: Hugely important for memory usage...
- jack: True, but accessing them is super faster in Servo. So, if we do fused objects, can we still be lazy, or not?
- mwu: I don't see any wins with lazily doing it. You have to allocate them one way or another.
- jack: The Rust side, yes; but the DOM object maybe doesn't if you never touch it.
- mwu: OTOH, you remove the Rust allocation in the eager side!
- jack: Isn't the problem total memory usage?
- pcwalton: No, the cost of the reflector+DOM object was large. But, with "magic DOM objects" we remove the reflector part. You have a JS object, but just what was in the separate allocation.
- jack: Point is that the JS object in Gecko is never created!
- mwu: But you still create the C++ object in Gecko's case.
- pcwalton: Yes, for all things in the heap. You have to create them and keep them around for incremental layout.
- jack: We should have bz here.
- mwu: There's also a lot we can do to reduce the DOM memory in this approach by using indexes instead of pointer (reduces sizes significantly - by 3/4). Would only work for trees with < 64k nodes or so.
- gabrielle: Only Gaia applications where we run into that are the SMS app. Otherwise, they're pretty small. In the future, trying to move that stuff to virtual lists where the DOM is a subset of the data and remove/add as the user scrolls.
- till: Are these moveable?
- mwu: Yup, removes fragmentation issues.
- pcwalton: Fragmentation is huge. Should consider it for the frame tree, too. Layout is so memory bound right now that increasing our cache line density would help.
- jack: I like this idea a lot and would love to see you hack on it :-)
SM perf issues
- jack: One SM issue is that the checks are in headers...
- larsberg: We wrap them in C code.
- jack: Solution is supposedly to compile SM with clang.
- mwu: Aha! The inline functions in the JS APIs. I just rewrote them in Rust instead.
- jack: They didn't want us to do that...
- larsberg: So?
- pcwalton: YOLO
- mwu: What we're doing right now is dangerous and prone to breakage, but it is not crucially urgent.
- larsberg: The SM team has offered to let us land code upstream if we provide tests. There is enough Rust infra support there.
- pcwalton: I think the Rust team should work on this. But we're OK for now. And I'd feel great landing this stuff upstream.
- mwu: There's a lot we can do with the bindings generator.
Exact rooting and stack maps
- pcwalton: This landed in LLVM upstream.
- larsberg: pnkfelix is working on this right now.
- pcwalton: Removing all our roots is nice.
- mwu: But, with rooting being annoying helps to avoid it.
- pcwalton: We can make it no-op.
Layout problems in FFOS
- gabrielle: During startup, we modify the DOM, which we know we shouldn't. The dialer might be static, but we have to check for RTL language, which is too late. We're not just flipping things over - some things are reflected, but some are not. It's huge JS code poking to flip things around.
- jack: Why JS flipping?
- gabrielle: It sets CSS attributes. It causes all of the prior layout work to be wasted effort, which is what's terrible. E-mail is even worse. The search field appears above the e-mail list, but in the layout it's just part of the whole object. So, at startup, we read the element and shift it. But, in order to read it, layout must be finished; then we move it, scroll, and have to layout again. We have a lot of pain points in the layout engine.
- mwu: But Servo doesn't have getComputedStyle?
- pcwalton: Has getBoundingClientRect, which is enough. But, really, what would you like to be doing? How would you like this fixed if the magical layout engine help?
- jack: Start with it hidden?
- gabrielle: Breaks async pan/zoom.
- jack: If it's AZPC, we should just test it.
- pcwalton: We have a great solution! We ONLY are async, whereas gecko will turn off async for broken cases and work synchronously.
- gabrielle: For the RTL stuff, it has to be wholistic.
- jack: Why not just be setting things globally?
- gabrielle: Maybe. But this also happens if you have > 1 SIM in the phone. Again, happens at startup of an app after layout has already started.
- pcwalton: So, the issue is that if you have synchronous layout, you have script then layout starting (partial), then script runs and discovers something that causes it to switch to a different state. Servo can help change this by at least being concurrent and possibly kill the layout if it's useless.
- gabrielle: It's mainly if layout is interruptable or not.
- pcwalton: We're always async, which is basically interruptable (we could add it). During the first (useless) layout, script can't run in Gecko. It can in Servo.
- jack: The one thing you can't do is ask for properties, though.
- mwu: How does GBCR work?
- pcwalton: Sends a reflow and then blocks. Have talked about async GBCR.
- jack: Could return immediately, though we don't do that yet.
- pcwalton: Can use the ReflowGoal infra there. ForScript could be smarter. Could use that for prioritization & cut-off.
- gabrielle: Only parts are useless. Would be nice if we're just incremental.
- pcwalton: We don't have all of bz's incremental tricks.
- larsberg: We are parallel, which papers over a lot.
- gabrielle: Anyway, I think Gaia's a great test case for this stuff. All over the place from veteran web devs to last-minute contract deliverables.
Dealing with the DOM APIs in Gonk
- mwu: That's next.
- jack: What are the first things you'd add?
- mwu: Indexddb. Promises.
- pcwalton: document.write?
- gabrielle: No. It's forbidden.
- mwu: How do you not have it? Isn't it scary not to have it?
- jack: Infra is there; we just don't have it wired up.
- pcwalton: Also need OMT HTML parsing.
- jack: We can hire things that are self-contained if there's stuff that people will work on. If you have a short list, we can look for people. Contracting possible; hiring researchers possible; using NCSU possible.