Work

Case study

Making a canvas editor responsive at scale

Keep a rich, editable canvas responsive as documents and element relationships grow more complex.

CanvasPerformanceSystems engineering
01

My contribution

My contributions focused on the editable Table and on loading, image-delivery, and rendering improvements across the editor stack.

02

Reasoning

I treated performance as an end-to-end work-budget problem: prioritize useful content, deliver assets according to how they are used, adapt rendering effort, and refresh derived state explicitly.

03

Outcome

Large boards became usable sooner, complex element trees required less unnecessary rendering, and tabular interfaces remained natively editable.

Lessons I carry forward

  • Optimize by avoiding work
  • Make invalidation an explicit contract
  • Measure systems end to end

The problem

A design editor cannot trade away editability to gain speed. A table cell still needs to behave like a real element, and a large board still needs to feel immediate even when its document tree, images, and nested containers are expensive to process.

This was not one isolated performance ticket. It was a family of symptoms that appeared at different moments: opening a large board, waiting for images, moving nested elements, resizing a table, scrolling complex panels, or changing the view until an optimization cost more than the work it avoided.

The shared problem was the amount of work performed before the user could do the next useful thing.

Why it was difficult

The Table combined containment with independently editable children. That created layout, selection, resizing, undo, and rendering-correctness concerns. At board scale, loading and rendering were coupled: fetching everything delayed useful content, while optimizing too broadly made complex content expensive and stale.

Every optimization also created a correctness obligation. Loading the visible page first meant the editor had to tolerate a partially present document. Caching geometry meant every layout-changing action needed to invalidate the right values. Adapting image delivery meant the editor had to change sources as the viewing context changed, without flashing or getting stuck when the source it wanted was unavailable.

The hardest bugs lived between valid ideas. An editable child could move while its parent owned layout. A cached composite could contain an actively edited descendant. A response could be compressed and still remain expensive to parse. Solving one layer in isolation was not enough.

My contribution within the team

I worked closely with product, design, and engineering teammates on the Table and its property-control layer, then contributed across client, server, and asset delivery to improve the surrounding experience. My main areas included prioritizing visible content, reducing redundant payload work, adapting image delivery to how images were being viewed, and improving canvas rendering.

For the Table, I implemented much of the container model, row and column operations, per-cell editing behavior, derived geometry, relayout rules, and integration with existing editor capabilities. Teammates shaped the product behavior, reviewed the design and implementation, and helped resolve the long tail of editor interactions. I documented the relayout contract so our future changes could preserve its assumptions.

For board loading, I followed the experience across network, data, and rendering layers. I removed redundant work, split loading so visible content could arrive first, introduced incremental element retrieval, and added compression for large API responses.

For images, I implemented an adaptive delivery service and editor-side source selection as part of the wider product infrastructure. For the canvas, I contributed substantially to rendering improvements and to an adaptive strategy for controlling cost as the view changed.

The key decision

I stopped treating performance as a request to make every operation faster. The better question was which work did not need to happen yet—or at all. Visible content could arrive first. Images could follow how they were being displayed. Rendering work could adapt to the current viewport and interaction.

Loading for usefulness

The loading path prioritized the page a person was looking at rather than requiring the whole board to become complete first. Parent and child data could arrive in stages, and large collections could be retrieved incrementally. HTTP compression reduced transfer cost, while payload trimming and loading order addressed work compression could not solve.

The key distinction was between a document being complete in memory and a document being useful on screen.

Images delivered for how they are viewed

The image pipeline asked for a source suited to how an image was currently being displayed, so a small on-screen image did not always pay the cost of the original. That happened underneath the editing experience and was never surfaced to the person using it; how the pipeline produces and keeps those sources remains internal.

Fonts followed the opposite rule: they often needed to load before text measurement because they affected geometry. Images could generally arrive later. Performance improved when resources were treated according to their role rather than one blanket preload policy.

Adaptive rendering under a budget

For complex canvas content, one permanent optimization rule fails at some scale. I helped shape a rendering strategy around a bounded work budget that responded to the current view and interaction state.

The editor avoided spending work that did not help the current view and prevented reused rendering state from interfering with active editing. The implementation details remain internal; the transferable idea is that optimization decisions should reflect current cost rather than a static rule.

Alternatives I rejected

Render the table as one flattened object. A single drawn object would have been dramatically cheaper: no per-cell element lifecycle, no cached geometry, no invalidation contract. It would also have ended the feature. A cell that cannot hold a real, individually editable element is a picture of a table. Editability was the product, so the cost moved into invalidation rather than being avoided.

Make the board complete before making it interactive. Waiting for the whole document is far easier to reason about — there is one state, and it is correct. But a person is not waiting for a document to be complete in memory; they are waiting to be able to act. Staged arrival is harder to get right and is the only version that matches what waiting actually costs.

Pick one permanent optimization rule. A fixed rule is easy to explain and easy to test. It also fails at some scale, and it fails quietly — the optimization keeps costing more than the work it avoids. Adapting to the current view and interaction state costs complexity, and I took that cost because the alternative degrades exactly when a board grows large enough to matter.

Trade-offs and reversals

Skipping work transfers complexity to invalidation. Cached geometry and nested elements need a clear refresh contract. We also explored more aggressive reuse, then reversed it when the broader interaction trade-offs were not right.

The repository records that the experiment was introduced, removed, and reconsidered quickly, but it does not preserve the original discussion. I therefore treat the reversal itself as evidence and avoid inventing a precise reason for it.

Incremental loading also affected editor and presentation paths differently, requiring a temporary return to an older retrieval path in some cases. Delivery configuration went through enabling, tuning, removal, and correction. These were reminders that performance work changes timing and partial-state assumptions throughout a product.

There was a repeatable harness. A scripted Playwright suite drove the editor against three fixed board fixtures — heavy, medium, and light — three runs each, with a HAR file captured per run. It ran every release for about two years, roughly thirty releases. Those fixtures differed in nesting depth rather than in flat element count: the heavy board is heavy because geometry has to be derived across nested composites, which is the cost model described above. The scenario definitions themselves remain internal.

What the harness lacked was enforcement. Results were recorded in a tracking sheet rather than failing a build, so a regression needed a person to notice it, and I still followed a long tail of invalidation regressions afterwards. It ran over real office Wi-Fi instead of a fixed throttle profile, so comparisons across dates carried network variance. The frame-rate series also lost comparability partway through, when the automation moved to a different machine. The gap was never measurement. It was enforcement and environment control.

Outcome

The editor could expose a flexible, editable table while larger boards became interactive earlier and complex scenes did less unnecessary work. First-time open of the heavy fixture went from about 60 seconds in mid-2023 to about 18 seconds from December 2024 onward, roughly 70% less. The medium fixture went from about 28 seconds to about 15, and the light fixture from about 17 seconds to about 8. Each figure is the median of three runs for that release.

On the rendering side, past 200% zoom the canvas held 60fps most of the time, and so did zooming into a large clipped container, verified with paired before-and-after recordings. A year later the harness independently measured a 59–60fps average on pan and zoom at 2%, 50% and 150% zoom.

Two limits on reading those numbers. The series begins in May 2023, so it does not cover the earlier 2022 compression and payload work; it documents the 2023–24 programme. And part of the improvement was not code — one release regressed sharply, and it was resolved by increasing server capacity.

The more durable outcome was a set of capabilities that supported later product work. Generated designs could create real tables because the Table was a native editor system. Figma import and browser capture could introduce large element trees that benefited from the same performance foundation. Image delivery continued serving authoring and export workflows without requiring every caller to understand its infrastructure.

The work also demonstrated that a solution can be successful and later be simplified. The separate delivery layer used for response compression was eventually replaced when the application stack gained a cleaner native option. That is not a failure of the earlier solution; good architecture also knows when an additional layer has outlived its purpose.

What changed in my approach

I learned to profile the whole experience—from network transfer through parsing, asset delivery, layout, and drawing—and to design cache invalidation alongside caching. What I would change is not the measuring. It is what happens to the measurements.

I would put the existing harness in CI, on fixed hardware with a controlled network profile, and give it a budget that fails the build instead of adding a row to a sheet. I would also give the recorded metrics an owner, because a number nobody watches is only slightly better than no number. And I would keep a decision log for experiments and reversals.

The principle I still use is simple: performance is a product behavior. The technical work may happen in a proxy, database query, image service, canvas cache, or React panel, but the unit that matters is how long a person waits before they can think and act again.