The video on-demand of this session is available to logged in QCon attendees only. Please login to your QCon account to watch the session.

Session + Live Q&A

Blazing Fast, Minimal Change - Speed Up Your Code by Refactoring to Rust

In order to improve the performance of existing applications and services, we can identify the most performance-critical pieces and reimplement them in Rust as opposed to completely rewriting the applications from scratch.

It’s tempting when we hear about a new technology or language to want to rewrite everything using that technology. Start over with a clean slate and fix all the problems of the old system. The new shiny system will surely be better than the last one! The constraints of reality often encroach on this fantasy as rewrite projects stretch to infinite timelines as bugs that the old system contorted itself to fix years ago reemerge. In pursuit of improving performance, we can instead rewrite only those pieces of an application that are truly important to performance and use cross-language bindings in order to link existing code bases with code written in Rust.

In this talk, we will take an existing codebase and rewrite part of it in Rust. We will focus on:

  • Determining the feasibility of this type of refactor
  • Identifying the pieces of the application most in need of performance improvement
  • Write a Rust reimplementation of existing behavior
  • Cross-language regression testing
  • Performance benchmarking of the new code

Main Takeaways

1 Hear about rewriting a portion of a code in Rust.

2 Learn how to identify the performance hotspots in a project, refactoring that piece of code in Rust, doing cross-language regression testing, and performing the benchmarks on the resulting code.

What is it you're working on today?

Today, I'm an engineering manager at OneSignal. I manage a team of six folks who write internal gRPC services and Kafka consumers in a mixture of Rust and Golang as depending on the performance needs and software needs of the project. The most exciting thing that we're working on right now is probably OneSignal's Journeys Project. Journeys Product, which just had its first public release a few weeks ago. It's an event driven system that allows our customers to use a very simple drag and drop interface to make very intricate, no code pipelines for how to message their client. So send this message wait X time. If they did click the message, send this other message. If they didn't click it, send that other message and it can get very large. And the whole thing is based on an event driven system that's maintained by my team.

What are your goals for this session?

In this session, I hope to educate people on how they can more easily speed up their existing monolithic software that's sitting out there, something like Python or Ruby. By adding in just a little sprinkling of Rust in the key places, and I hope to meet some interesting people in London.

And what would you like people to walk away with after they attend your session?

I would like people to walk away with an appreciation for how small a delta they can make in the code with how large of a performance benefit that could come out of it. It's really tempting to think like, Oh, we want this thing to be faster, we need to rewrite the entire world in Rust or Go or some new programming language, whatever. But I think the reality is, if you identify the hotspot you swap out the slowest code for the fastest code, then you can have a real difference with a small amount of effort.  


Lily Mara

Engineering Manager @OneSignal

Lily Mara is an Engineering Manager at OneSignal in San Mateo, CA. She manages the Infrastructure Services team, which is responsible for in-house services used by other OneSignal engineering teams. Previously she was a software engineer at OneSignal, leading the efforts to create OneSignal's...

Read more


Thursday May 12 / 01:30PM EDT (50 minutes)


WebAssembly & Modern Systems Programming Languages


WebAssemblyRustProgramming Languages

Add to Calendar

Add to calendar


From the same track

Session + Live Q&A WebAssembly

There and Back Again: Our Rust Adoption Journey

Thursday May 12 / 10:00AM EDT

The introduction of a new programming language is a significant undertaking with long-term implications — a choice not to be taken lightly. TrueLayer's main business is not system programming, yet we decided to bet on Rust. Why? How?During the talk we will walk through our adoption...

Luca Palmieri

Principal Engineer @TrueLayer

Session + Live Q&A WebAssembly

Better Serverless Computing With WebAssembly

Thursday May 12 / 12:20PM EDT

About 10 years ago Fastly was founded with the goal of bringing developer's applications as close to users as possible.In this talk you'll see why WebAssembly is the next big step on our journey to computing at the edge. Learn about our edge computing platform, Compute@Edge, and upcoming...

William Overton

Senior Serverless Solutions Architect @Fastly

Session + Live Q&A WebAssembly

WebAssembly: Open to Interpretation

Thursday May 12 / 11:10AM EDT

Webassembly has been doing the rounds for a little while now. It's implemented in all major browsers, and we've seen several large, typically desktop-only apps use it to run on the web. Not to mention DOOM, of course.This makes Webassembly seem intimidating, surely there must be a lot to...

Rob Pilling

Lead Developer @Scott_Logic

View full Schedule