Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Canva Engineering 8 min read Case study mediumAdept

From Intern Project to Production: How I Shipped the Draw Tool for Canva's Present Mode

Bringing Canva's editor draw tool into present mode required three fixes: extracting the editor-coupled draw logic into a new shared package with interfaces between shared classes and domain-specific implementations (Open/Closed Principle), normalizing stroke coordinates so drawings stay correctly positioned and scaled across Presenter View's presenter and audience windows, and lazy loading the draw tool with code splitting. The lazy loading cut the presentation load-time regression from 7% to 0.24%. The feature started as an intern proof of concept and now sees about 470K monthly active users.

Assumes: frontend code splittingobject-oriented design

Related posts

  • Rendering huge pull requests in the GitHub Copilot app

    GitHub Engineering mediumAdept

    The GitHub Copilot app's pull request view stays responsive on a 2,200-file, million-line diff with 400+ review comments by splitting document height into two geometries: exact, precomputed prefix-summed code rows and lazily measured dynamic blocks for comments, drafts and composers. A single idle- and scroll-gated measurement pass scoped to about 2400px around the viewport replaces per-block ResizeObserver write-back, which caused feedback loops. Observers only flag blocks for re-measurement, except for user-caused resizes, which commit synchronously at most once per frame. Identity-based scroll anchoring keeps corrections small, and a cache of recent diffs prevents an instantly drawn shell from sitting around an empty diff. Bugs were found with permanent in-app probes asserted as CI budgets and an autonomous headless change→measure→improve loop.

  • Speeding up file load times, one page at a time

    Figma mediumAdept

    Figma extended dynamic page loading from view-only files and prototypes to editable files, cutting load times for the slowest 5% of loads by 33% and reducing client memory. Editing requires write dependencies as well as read dependencies. These are the inverse edges that let an edit to a component, style or variable propagate to cached derived data on instances and auto layout frames, which may sit on unloaded pages. The QueryGraph dependency framework in the multiplayer server became a bidirectional graph with explicit foreign-key edges and implicit edges such as auto layout. The server uses it to compute each session's reachable subset as collaborators edit, and a shadow-mode validator flagged edits outside the computed write set, uncovering missed cross-page dependencies before launch.

  • Behind the feature: comments, contextually

    Figma mediumAdept

    Adding general and contextual (canvas-anchored) comments to Figma Community files turned out to be harder on interaction design than on code reuse. A bug bash surfaced UX problems that led to a lightbox-style modal replacing a fullscreen view that was easy to enter but hard to leave, plus pin icons, "See in context" hints and a scroll-back button for contextual comments in the feed. On the frontend, smooth panning between comment locations came from exposing animation parameters in Figma's Skew-based viewer. The hover expansion avoids canvas re-renders by keeping the viewer at full size and shrinking an overlaid border mask, and an intermediary state converts coordinates so CSS can animate the switch from absolute to fixed positioning.

  • Keeping Figma fast

    Figma mediumAdept

    Figma replaced its single-MacBook performance testing setup with two systems sharing one CI scheduler. The first runs end-to-end tests in headless Chromium on GPU-enabled cloud VMs for every pull request, finishes within 10 minutes through parallel runs, and uses a 20% pass margin to catch large regressions despite VM noise. The second is a small fleet of older real laptops for on-demand runs such as bisecting subtle regressions and benchmarking hot-path optimizations. Instruction counting and a full device farm were rejected because Figma's WASM/WebGL workload is bound variously by CPU, GPU and I/O. Case studies show the setup validating rendering time-slicing that prioritizes local edits over remote multiplayer changes, improving perceived frame rate on slow devices.

  • Adopting Jetpack Compose for Etsy’s Android App

    Etsy Code as Craft mediumAdept

    Etsy adopted Jetpack Compose as its preferred Android UI toolkit through a staged rollout. It started with an internal curriculum and Compose versions of design system components, then moved to an internal-only screen, then user-facing bottom sheets, and finally a three-month rewrite of the Shop screen paired with the Macramé unidirectional-data-flow architecture. An A/B test showed 5% faster initial render and improvements in conversion, add-to-cart and other engagement metrics, and engineers reported less code, better test coverage and value from Compose Previews. Pain points included an alpha-stage third-party library and the different key and item-reuse semantics of LazyRow/LazyColumn compared with RecyclerView.

The quest for software engineering knowledge.

Look:
Layout: