Fearless Concurrency in Firefox Quantum

These days, Rust is used for all kinds of things. But its founding application was Servo, an experimental browser engine.
Now, after years of effort, a major part of Servo is shipping in production: Mozilla is releasing Firefox Quantum!
Rust code began shipping in Firefox earlier this year, starting with relatively small pilot projects like an MP4 metadata parser to replace some uses of libstagefright. These components performed well and caused effectively no crashes, but browser development had yet to see large benefits from the full power Rust could offer. This changes today.

Stylo: a parallel CSS engine
Firefox Quantum includes Stylo, a pure-Rust CSS engine that makes full use of Rust’s “Fearless Concurrency” to speed up page styling. It’s the first major component of Servo to be integrated with Firefox, and is a major milestone for Servo, Firefox, and Rust. It replaces approximately 160,000 lines of C++ with 85,000 lines of Rust.
When a browser is loading a web page, it looks at the CSS and parses the rules. It then determines which rules apply to which elements and their precedence, and “cascades” these down the DOM tree, computing the final style for each element. Styling is a top-down process: you need to know the style of a parent to calculate the styles of its children, but the styles of its children can be calculated independently thereafter.
This top-down structure is ripe for parallelism; however, since styling is a complex process, it’s hard to get right. Mozilla made two previous attempts to parallelize its style system in C++, and both of them failed. But Rust’s fearless concurrency has made parallelism practical! We use rayon —one of the hundreds of crates Servo uses from Rust’s ecosystem — to drive a work-stealing cascade algorithm. You can read more about that in Lin Clark’s post. Parallelism leads to a lot of performance improvements, including a 30% page load speedup for Amazon’s homepage.

Wrapping up
Overall, Firefox Quantum benefits significantly from Stylo, and thus from Rust. Not only does it speed up page load, but it also speeds up interaction times since styling information can be recalculated much faster, making the entire experience smoother.
But Stylo is only the beginning. There are two major Rust integrations getting close to the end of the pipeline. One is integrating Webrender into Firefox; Webrender heavily uses the GPU to speed up rendering. Another is Pathfinder, a project that offloads font rendering to the GPU. And beyond those, there remains Servo’s parallel layout and DOM work, which are continuing to grow and improve. Firefox has a very bright future ahead.
As a Rust team member, I’m really happy to see Rust being successfully used in production to such great effect! As a Servo and Stylo developer, I’m grateful to the tools Rust gave us to be able to pull this off, and I’m happy to see a large component of Servo finally make its way to users!
Experience the benefits of Rust yourself — try out Firefox Quantum!

Read the full article:
blog.rust-lang.org/2017/11/14/Fearless-Concurrency-In-Firefox-Quantum.html

Other urls found in this thread:

hacks.mozilla.org/2017/11/entering-the-quantum-era-how-firefox-got-fast-again-and-where-its-going-to-get-faster/
github.com/tokio-rs/tokio
crates.io/crates/mio
tokio.rs/
en.wikipedia.org/wiki/Enigform
gnunet.org/gns
github.com/rust-lang/rfcs/pull/2033
twitter.
twitter.com/NSFWRedditVideo

Is parallelism really this hard in other languages, especially C++? Or are the pozzilla devs just shit?

(checked)
Short answer: Yes
Long answer: You're a nodev LARPing as a dev so you wouldn't know what it is like working on a big codebase.

Watch out who're calling a nodev, i wrote hello world in C!

Styllo doesn't work properly with standard stuff like bootstrap and materialise, so, fuck off

They're just shit. You can easily make a nightmarish mess out of concurrency if you don't know what you're doing but there are plenty of modern design patterns to stay safe. The only time it gets really sketchy is when doing kernel work where only relatively high-risk primitives are available and are used dangerously for performance and the extreme code churn of the kernel can lead to a successful merge that changes which primitive is covering your code. It's why companies are so reluctant to change kernel versions and instead pay for almost every major kernel release to be maintained 'stable' these days.

wrong


gtfo pajeet

FF 52, Chrome, and Quantum

(checked)
well maybe firefox 52 and chrome are fucked up. can you provide the source please?

The technology behind the modern internet is fundamentally insecure. The backbone of half a billionwebsites, SSL, now known as TLS, is broken. TLS is the protocol behind HTTPS, whichkeeps your transactions with your bank, BitPay, and even your logins to Googlesecure - or at least, that's the idea. The current model, however, does not appear to be working.A world where 200,000 of the top million sites have poorly implemented HTTPS is not acceptable. Theconsequences from having one's usernames and passwords stolen can be far-reaching, catastrophic, andhard to deal with. And if those details are financial, even one's wealth can become at risk.The first rule of security is that of keeping the number ofparticipants as low as possible - TLS adds a third, always looming, in total controlover proving you're talking to who you think you are. These are Certificate Authorities - Acentralised cartel of secretive bureaucratic corporations, issuing the documentation you need for safebrowsing, and they have shown time and time again they cannot be trusted.

Yeah. Quantum gets it right. Rust wins again.

Seriously it's even the same fucking few pictures.

btw this is how it looks on firefox developer edition 58.0b3

btw: Keeping financial transactions and web browsing secure: Introducing Aguris, a game-changing cryptocurrency.
LOOOOOOOOOOOL. kill ypurself cryptokike

I take it they've updated since I last used it, so fair enough.

So what they are saying is that their shit is broken by design?

Gotta make money somehow. Let's Encrypt is great and all, but centralised cancer. Crypto-Decentralism is the future.

(Until some sort of DNS level encryption is developed.)


The plan is to use blockchain technology to implement a distributed certificate authority. That way, CAs can't kike you. Let's Encrypt is great but centralised, and will eventually run out of money.

So how is this better than self signed certificates?

Self-signed certs are only useful if you know you can trust the self-signed cert. They're not useful on the open web.

So how do I know that I can trust your decentralized cryptokike certificates?

The same way you can trust LE's, they'll be DV certs requiring proof you control the server. Look up ACME

But how do I know that I can trust the cryptokike cryptocurrency?
It really seems like a meme that is never going to take off tbh.

i use an older laptop it runs hot and firefox consistently crashes around 75c - 90c. often kernel panic occurs and i'm forced to restart. this happens reliably, as in guaranteed, when firefox is running and the computer reaches these temps.

running qupzilla, this never happens.
note that firefox uses rust, qupzilla is c++ :)
a lot of things are fucked with firefox but this is some real pajeet-tier bullshit firefox is pulling.

and i'll add qupzilla performs flawlessly even when temps reach 100c and the cpu throttles.

I don't know what you mean. It's cryptocurrency, there's no need for trust.If something is wrong it won't be cryptographically verifiable

LOL. You are just adding lots of shit which increases the attack surface but it is ok because crypto. Have you actually verified that their crypto isn't fucked? Have you verified that the implementation of their shit isn't fucked?

parallelism is one of the hardest things to do correctly. Specially since there are lots of ways to do fast code that breaks, and lots of ways to do slower (even single threaded) that don't.

That being said... Its not the hardest problem. Nor the most important one.

Even if rust did parallelism correctly and "fearlessly' (which I doubt, given the rust constricts and forces you to bend backwards to play it safe already) Its not worth the sintactic nightmare nor the ugly, narcisistic cult that tries to convince you its the best language ever.

They are just silly people that wasted their time in something short lived.

They make me think on the " the king come down" creepy pasta. Theyre just helpless fools trapped in some shitty mind curse, trying to shit other people minds. They're unable to hold conversations and they will dismiss everything you say to them, appearing all shining and clean on the next thread as if they had not received a severe beatdown decomposing their beliefs.

bla
bla
bla
bla
bla
bla

epic post bro

Meant to answer


Youre still a fucking cult.

They can capitalize the first Letters of random Nouns all they want, I'm not adopting it if I can't use my Add-ons.

Gotta admit, he found a great way to market his cryptobubble.

OMG FIREFOX QUANTUM IS SO FAST IM USING IT RIGHT NOW ANDS ITS BLAZING FAST OMG OMG
RUST IS THE BESTEST!111!

let's see it.

Sticking with Chromium eh?

It isn't so much that C++ is harder, but that Rust is faster, uses less memory, needs less code and takes less time to develop.

It's not that fast.

Seamonkey and Palemoon remains faster as for loading and memory impact.

the rest depends of your internet access.

Also, Quantum is a buzzword that don't mean jack shit in anything but particle physics.

They better not fuck this up, Firefox can't render more than a few dozen box shadows before it shits the bed.

Samefag.

Fucking genius!
Not I can choose between a bloated, slow piece of shit with functionality or a bloated, slightly faster piece of shit without any functionality. What a time to be alive!

hacks.mozilla.org/2017/11/entering-the-quantum-era-how-firefox-got-fast-again-and-where-its-going-to-get-faster/
The Firefox Quantum story is actually inspiring.

retard

That's code for made up bullshit about one-armed quadriplegic non-binary muslim trans-lesbians of color finding a safe space to build clocks, I mean, to "program", right?

Many add-ons cannot or will not be updated to the new, shitty and restrictive system.

Also, moon is a buzzword that doesn't mean jack shit in anything but spaceflight

Short answer Wrong.
Long Answer: If your threat model includes pervasive mass surveillance from a passive attacker, unauthenticated encryption can provide confidentiality without integrity. (But provides no protection from an active MITM)

I honestly don't have a problem with rust. It's not C, but not every language needs to be. I do, however, have issues with groups that adopt SJW codes of conduct. Granted, it's not like they can stop you from writing shit in rust even if you don't follow it, but it still worries me.

Cancer

Is DNScrypt not what you are looking for?

Bullshit.
Bullshit.
Maybe the only valid point.
Fucking bullshit. Nobody can write 1 line of Rust code without thinking for 3 minutes beforehand.

This is a good thing.

No it isn't, you mongoloid. In other programming languages, you think about how to solve the problem. In Rust, you think about how to get the arcane syntax for the statement you want correct.

So in rust you have think about:
a) how to solve the problem
b) how to express your solution in rust
whereas in other languages you think about:
a) how to solve the problem
b) how to express your solution in rust

Truly a world of differences

Stop putting words in my mouth, you know exactly what I meant. Rust syntax is so complex and the stdlib is so fucked up that writing a single line of code takes minutes. Plus they said they will never support shit like epoll so it's useless for sockets.

...

github.com/tokio-rs/tokio

stopped reading right there.
lies

Did you even look at the references under "rust friends"

You are just too retarded to understand abrilliant language. Maybe you should take a look at Go?
What?????? How is the std fucked up? How is the std at fault when you can't grok Rust's syntax?
Bullshit. We never said that we will never add async io into the std. take a look at those projects:
crates.io/crates/mio
tokio.rs/

sudo apt-get install etherape
Enjoy the botnet.
Install icecat.
Cult thread

Is the volunteer paid to let these threads a thing ?
You need to get back to your cult.

Can't say it isn't.
en.wikipedia.org/wiki/Enigform
gnunet.org/gns

Just switched to FF 57, and it seems slower than current Waterfox release.
On the other hand, everything is slow as fuck for me now, maybe it's related to running laptop with removed battery, which could maybe limit peak CPU speed or something. So maybe it's not FF at fault.

yes, all volunteers on 8ch are corrupt and get bribes for deleting some stuff and not deleting other stuff. Holla Forums is not any different

Without coroutine support on language level, this stuff is cumbersome.
This is why everybody sticks with Python unless high speed byte crunching at application level is also needed.
Until Rust Stable doesn't have coroutines, it pretty much loses to Python in this regard.

github.com/rust-lang/rfcs/pull/2033

bump X^D

RustBridge, their diversity program to AIDS and rape up the project, should be petitioned to onboard Nazis. After all, they want diversity.

They're trying to re-invent an OS and call it a web browser. Notice how they're doing a shit job of it? ..and just have found out about concurrency. What do you think?

Javascript was a mistake. The internet is more than the WWW. Web is not a suitable place for 1 billion different shit javascript UIs, crap video players, and unmanaged, unsigned code-injection delivery systems.

twitter. com/clementd Another faggot leftist openly inciting violence on Shitter. Let's tell """him""" what we think, and then start using their language but not contributing anything back. Technological appropriation begins today.

...

This guy kind of reminds me of John Oliver.

These days Rust is ever more Gay Bathhouse: The Language. I imagine you smoke cock everyday right OP?

The reason why you see this is because you're confused about web browsers. There is no web browser that's trying to re-invent the OS.

...

Who are you quoting?

Who are you fooling?

Don't answer a question with a question!

...

>(((quoting)))