Live data from Hacker News

Keeping Figma Fast: perf-testing the WASM editor

figma.com

61–70 of 99 posts

Re: Keeping Figma Fast: perf-testing the WASM editor

#61
post #24

Earlier quoted context omitted.

+1 to heap size limit speaking as a PM over here at Figma. We regularly see files with hundreds of thousands of layers, and trying to keep those enormous files under 2GB of memory for usage across all supported browsers is a constant struggle. Would love to see that cap get raised across the board, it'd enable us and others to do so much more.

It's amazing what we lost moving from desktop to retrograde world of the web. I wonder what's next in the indirection game?

VR. Super constrained.

Re: Keeping Figma Fast: perf-testing the WASM editor

#62
post #7
post #4

Occasionally I wonder what could have happened to front-end web application development over the past few years if Figma had open-sourced their WebGL-based GUI library. We've had ~15 years of focus on the DOM with the progression of jQuery to Backbone to Vue, and many other libraries. At least what I've heard of the Figma approach almost sounds like the Adobe Flash/Flex runtime. That might only make sense for applica…

Could someone compile Skia to WASM and add a layer for some UI niceties like flexbox? I wonder what the layer they have consists of.

Yes, which is what Flutter basically does.

Re: Keeping Figma Fast: perf-testing the WASM editor

#63
post #59

Figma is anything but fast. Whenever I need to open a file it takes a minute to load on my half a gigabit connection. It's strange how much people are willing to put up with slow software nowadays.

How fast is it after opening the file? I’d imagine there are trade-offs being made where some aspect of performance are sacrificed to improve others but I haven’t used Figma (sadly, it looks really nice)

It does pretty well after the initial loading. But the loading is excruciating for me because I need to open different files again and again throughout the day, and it takes the same amount of time to load every file every time.

Re: Keeping Figma Fast: perf-testing the WASM editor

#64
post #4

Occasionally I wonder what could have happened to front-end web application development over the past few years if Figma had open-sourced their WebGL-based GUI library. We've had ~15 years of focus on the DOM with the progression of jQuery to Backbone to Vue, and many other libraries. At least what I've heard of the Figma approach almost sounds like the Adobe Flash/Flex runtime. That might only make sense for applica…

You'd likely get something like Flutter. It's actually gotten quite good these days with their web version, 300 ms to load a counter app, and 150 ms with WASM enabled.

There's a great post by Ian Hickson, the project lead of Flutter, about how we might have more WASM based web apps while keeping the DOM for content based websites:

> This document proposes to enable browsers to render web pages that are served not as HTML files, but as Wasm files, skipping the need for HTML, JS, and CSS parsing in the rendering of the page, by having the WebGPU, ARIA, and WebHID APIs exposed directly to Wasm.

https://news.ycombinator.com/item?id=34612696

Re: Keeping Figma Fast: perf-testing the WASM editor

#65
post #59

Earlier quoted context omitted.

How fast is it after opening the file? I’d imagine there are trade-offs being made where some aspect of performance are sacrificed to improve others but I haven’t used Figma (sadly, it looks really nice)

It does pretty well after the initial loading. But the loading is excruciating for me because I need to open different files again and again throughout the day, and it takes the same amount of time to load every file every time.

(author of the article)

I want to acknowledge that the load-times for Figma go up linearly with the complexity of your design file + its dependencies. It is always painful when users rightfully complain about giant design files taking a while to load and fully render.

The team is working on changing that so hopefully your experience gets better over time.

This is not my area of expertise, so I am not in the position to promise anything on this forum but I just want to say that the testing framework described in the article is also used to continuously test and measure the file load/parsing time as folks are working towards algorithmic improvements.

Re: Keeping Figma Fast: perf-testing the WASM editor

#66

Earlier quoted context omitted.

It's amazing what we lost moving from desktop to retrograde world of the web. I wonder what's next in the indirection game?

VR. Super constrained.

AR like how Microsoft and apple envision it is freeing in a lot of ways.

Circular interfaces? No worries. Persistent always on top but small and low utilization? Not a problem. spatial contact aware apps? Gimme.

Dev Ex Is going to suck hard for a long time, but good AR hardware will be the opposite of constrained.

Re: Keeping Figma Fast: perf-testing the WASM editor

#67

Is Figma fast? I see huge lag on loading files. Sometimes images don't load for 10+ seconds after the file opens. Based in EU we often don't get thought about in testing.

The answer to "is x fast?" is always "compared to what?" Having been a long-time user of Figma's somewhat-trailing (at this point) competitor, Sketch, speed is surprisingly one of Figma's most immediately-apparent advantages despite being web-based rather than MacOS-native. At a previous job, we had a Sketch file that contained more or less an entire B2B app, and at hundreds of megabytes, it took tens of seconds to l…

The most telling point to me is when people outside of product, design, or engineering use figma for the first time.

In my experience they dive in and don't think about it, it's just natural to use. Not to say the UX is ideal, because imho it sucks hard, but no one complains about *having to use a webapp when they open figma.

Re: Keeping Figma Fast: perf-testing the WASM editor

#68
That's kind of wild to me to see an app like Figma that's a commercial success, but also a demonstration of technical excellency. My brain automatically assumes that you can't pick both commercial success and technical excellency at the same time and must compromise on the latter to build more features. But maybe there is hope and users actually love the benefits of a better tech stack (performance, consistency, stability) and maybe it's easier to build features with an excellent technical foundation.

Re: Keeping Figma Fast: perf-testing the WASM editor

#69

That's kind of wild to me to see an app like Figma that's a commercial success, but also a demonstration of technical excellency. My brain automatically assumes that you can't pick both commercial success and technical excellency at the same time and must compromise on the latter to build more features. But maybe there is hope and users actually love the benefits of a better tech stack (performance, consistency, stab…

> My brain automatically assumes that you can't pick both commercial success and technical excellency at the same time

The problem is your anchor point. Your idea of what software can and should be is based on? Gmail? Salesforce? The GTAV loading screen? The iOS warning that you’re running out of icloud storage space?

Silicon Valley software expectations are tainted by recency bias and private equity excrement.

The current ceiling to aspire to is literally “CI passes”

Re: Keeping Figma Fast: perf-testing the WASM editor

#70
post #53

> We recently developed stress test scenarios for rendering complex scenes—like thousands of layers edited by 50 multiplayer users—and took a very deep dive into CPU and GPU profiles. I don't really know what any of this means. You're running a single-thread graphics API (OpenGL) in a browser (does WASM support background threads?). On any modern PC, that's gonna look like 1 CPU thread doing all the work and the GPU…

> does WASM support background threads?

yes

Figma is able to use more than 1 CPU core and also claim a lot of your GPUs capabilities.

Don't believe me? Open Figma, load a large file and watch it use multiple CPU cores using htop. Driving the GPU is not all the application does. It also has to work with a largish model and abstract syntax tree and do lots of complex things with that before it goes anywhere near the GPU and opengl. Driving that probably happens on the main thread.

On a modern M1, the app is fast and responsive. It only uses a few worker threads (less than the number of CPU cores) and the GPU is fast enough to keep framerates high if you do things like zooming and panning the view. It's the older and slower laptops that are going to be more challenging.

Post reply on HN