← Back to context

Comment by jhoechtl

1 year ago

Servo is a waste of time. If we want a fast rendering engine, Mozilla already has it.

If we want a secure rendering engine we could leverage code checks.

It's all there. The meme of Rust equals safety (or C equals I safety) has to go away.

Servo was about parallelism.

Mozilla tried multiple times to parallelize CSS style calculation in Gecko which is written in C++, and failed all of them. When they tried again in Servo with Rust, they succeeded first time.

They integrated Rust-written parallel CSS style calculation to Gecko. As a result, to this day, Firefox is the only web browser which can parallelize CSS style calculation, and beats every other browser in CSS style calculation performance.

The meme that Rust is easier to parallelize is true.

  • I don't think this has anything to do with the language itself. If anything, you could claim the same for C++ since "easier to parallelize in Rust" is derived from the fact that Rust models pretty much everything as a shared-ptr so many gotchas you would normally have in multithreaded (but not concurrent) code disappear. Since you have the shared-ptrs in C++, you can achieve pretty much the same and also quite easily.

    So I think that the programming language as an underlying reason is most likely a wrong premise to start with. IMO there's a huge difference between "here's several MLOC with all of its 20-years legacy/baggage, and now make N% of that non-trivial work to run faster" and "here's a greenfield project with 0 LOC, no legacy and no baggage, no code to learn, and now please write the algorithm from the ground up". I think this is much more likely to be closer to the truth.

    • Rust doesn't model everything as a shared_ptr, it gives you a choice of tools that fit different use cases - just like C++ does. The difference is if you mess up, it is massively more likely to detect it at compile time.

      I agree that starting from scratch can make a huge difference, but if you're starting from scratch anyway why not use the language that will prevent you from making mistakes in your design?

      10 replies →

Firefox owes quite a bit of its speed to Servo... so that's a weird take.

Honestly I think servo is a worthwhile endeavor if solely because it has the potential to introduce some needed variety into the browser engine space.

Especially if they can dial it in with tauri as a viable electron/blink alternative.