Skip to content
Dulini Mendis
Leonardo.ai
Build

Faster generation history

Making generation history, where people go back to everything they've made, fast again, and untangling the React components behind it.

Built with

  • React
  • Next.js
  • TypeScript
Leonardo's generation history: two past prompts for illustrations of a fluffy cat, each with model, size and style tags, a How was this output? rating, and a row of four generated images, one set of orange cats and one of grey cats.
Every prompt you've run, with its settings and the images it made. Long histories like this are what had to stay fast.

The story

Context

Generation history is where Leonardo users go back to the images and videos they've made, and it had become slow.

The code behind it was part of the problem. Over time its React components had grown tangled together, so a change in one place could ripple into others, and it was hard to see why the page was slow, let alone fix it.

What I did

I led the work to make generation history fast again.

Alongside the performance fixes, we cleaned up the component hierarchy around it. We pulled apart components that knew too much about each other, so each one has a clear job and can change without breaking its neighbours.

Outcome

Generation history got faster, and the code behind it is easier to understand and safer to change. That makes the next improvement to it cheaper too.