Evan Wallace | @evanw@hachyderm.io Profile
Evan Wallace | @[email protected]

@evanwallace

Followers
22,152
Following
386
Media
43
Statuses
554

Working on esbuild. Cofounder of @figma . Proficient with web browsers.

Joined May 2011
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
@evanwallace
Evan Wallace | @[email protected]
3 years
Before 2021 ends, I'd like to share some personal news: I left Figma earlier this year. Dylan and I started it together way back in 2012, and since then it's done better than I ever imagined it would. It was the ride of a lifetime.
65
63
2K
@evanwallace
Evan Wallace | @[email protected]
4 years
I just made a high-performance source map visualization tool that doesn't freeze with large source maps: . It was super helpful for debugging real-world source map generation issues in esbuild. Hopefully others find it useful too.
Tweet media one
18
177
1K
@evanwallace
Evan Wallace | @[email protected]
4 years
Just published my recent maker week project: a plugin that adds variable-width stroke to @figmadesign ! Install the plugin here: Try it out here: Thanks to @viviariums for supplying her calligraphy for testing!
27
82
893
@evanwallace
Evan Wallace | @[email protected]
4 years
JavaScript bundlers don't have to be slow. I'm making a new one called esbuild to show how fast they could be: . It's 10-100x faster than webpack/parcel/rollup on my benchmarks. For those who've seen this already: TypeScript support is new (just landed)
Tweet media one
26
136
806
@evanwallace
Evan Wallace | @[email protected]
4 years
I took some time to improve the "Why is esbuild fast?" section of the website, which was previously just a few sentences. This is why esbuild is faster than other bundlers, to the best of my knowledge:
13
153
782
@evanwallace
Evan Wallace | @[email protected]
4 years
Just released v0.4.0 of esbuild, an extremely fast JavaScript bundler New in this release: - ES module output - Performance improvements - Preliminary tree shaking support - Updated benchmarks (esbuild is now ≥100x faster than other bundlers) More info:
Tweet media one
16
126
719
@evanwallace
Evan Wallace | @[email protected]
3 years
I recently added some features to esbuild that you can use to reduce output size and improve output speed: - TypeScript enums are now inlined and tree-shaken (always enabled) - You can now customize property name mangling (see )
Tweet media one
9
57
648
@evanwallace
Evan Wallace | @[email protected]
4 years
Just made the new website for esbuild public! There is now comprehensive API documentation for everything, including code examples for all three languages (CLI/JS/Go).
14
102
624
@evanwallace
Evan Wallace | @[email protected]
4 years
Some recent esbuild updates: - There is now an official logo, pictured below. It's inspired by the fast forward symbol. - The built-in web server can now serve arbitrary files instead of only files generated by esbuild. You no longer need another web server for your HTML files.
Tweet media one
11
57
573
@evanwallace
Evan Wallace | @[email protected]
4 years
Starting with version 0.8.47, esbuild now supports Apple's M1 chip natively and no longer needs Rosetta 2: . I don't own a M1 myself but I've heard that the native executable is ~1.4x faster than the translated executable on esbuild's primary benchmark.
10
48
497
@evanwallace
Evan Wallace | @[email protected]
4 years
The latest version of esbuild now has watch mode. I think this was one of the more widely-requested upcoming features. The implementation is currently polling-based for portability. Docs & more info:
6
54
475
@evanwallace
Evan Wallace | @[email protected]
3 years
My benchmark has been updated with Parcel 2 beta 3, which was released today: . With the Rust rewrite, Parcel 2 is now faster than Webpack! Congrats to Parcel for their hard-earned speed-up.
Tweet media one
13
56
466
@evanwallace
Evan Wallace | @[email protected]
3 years
New in esbuild version 0.9.0: * Support for node's new "exports" map feature () * JSON metadata is now returned directly from the API * The JavaScript API has been simplified * Support for CSS banner and footer Full release notes:
10
61
467
@evanwallace
Evan Wallace | @[email protected]
3 years
Huge congrats to the Parcel team for such a big release! I updated esbuild's benchmark results again now that Parcel 2 has come out of beta. The latest release of Parcel 2 is even faster than the beta version and is now faster than Rollup + Terser:
Tweet media one
6
37
438
@evanwallace
Evan Wallace | @[email protected]
3 years
I don't have too much to share about what's next for me. No big plans at the moment; I'm mainly taking a break. Just wanted to share publicly that I left so people don't think I'm still at Figma!
15
3
418
@evanwallace
Evan Wallace | @[email protected]
4 years
I just updated the benchmarks for esbuild. It uses the latest versions of all bundlers and now includes Parcel 2 and Webpack 5. More details here:
Tweet media one
14
74
357
@evanwallace
Evan Wallace | @[email protected]
4 years
I just wrote some docs about tree shaking and code splitting in esbuild. Read them here: Hope people find it interesting! Personally I was surprised by how closely related the two problems are.
Tweet media one
6
42
317
@evanwallace
Evan Wallace | @[email protected]
3 years
Deciding to leave was really tough but it ended up being the right call for me. I'm so incredibly lucky to have been able to work with all of the amazing people at Figma who made the product the success it is. Figma is in such good hands.
4
0
317
@evanwallace
Evan Wallace | @[email protected]
5 years
I made a Figma plugin that lets you edit fill rules: . Now you can convert the even-odd fill rule to non-zero for export to formats that don't support even-odd (e.g. TrueType fonts).
9
31
279
@evanwallace
Evan Wallace | @[email protected]
3 years
The latest version of esbuild has *very experimental* support for the Deno runtime. I'm soft-announcing this in case anyone is interested in trying it out. The API is the same as esbuild's npm package. Here's an example of how to use it:
3
35
254
@evanwallace
Evan Wallace | @[email protected]
4 years
The latest version of esbuild can now compile all widely-used ES6+ syntax features down to ES6. If you're using Babel or TypeScript to transpile newer JS syntax down to ES6 and want a speed boost, you may want to try esbuild's API instead. More info:
Tweet media one
6
32
229
@evanwallace
Evan Wallace | @[email protected]
8 years
Easy Scalable Text Rendering on the GPU (the rendering tech behind ):
5
101
212
@evanwallace
Evan Wallace | @[email protected]
2 years
Put something new on my website: Tagception, a nesting tag viewer for macOS. I wrote this to help my partner and I sort and view our photos, and we use it every day. Making it public since others have asked for it too:
Tweet media one
11
17
230
@evanwallace
Evan Wallace | @[email protected]
7 years
Figma loads 3x faster after switching to #WebAssembly ! Details are here: . Very exciting for the future of the web.
Tweet media one
2
74
206
@evanwallace
Evan Wallace | @[email protected]
4 years
The documentation for writing esbuild plugins is now available:
4
27
207
@evanwallace
Evan Wallace | @[email protected]
5 years
I finally wrote about how Figma’s multiplayer algorithm works! Our document structure is a tree similar to the HTML DOM, and we sync it using a technique inspired by CRDTs. Read more here:
10
32
199
@evanwallace
Evan Wallace | @[email protected]
4 years
I recently released esbuild 0.5.0. Highlights since 0.4.0: * Golang API * JavaScript API for the browser * TypeScript decorator support * Path aliases using "paths" in tsconfig.json More info: Release notes:
4
23
193
@evanwallace
Evan Wallace | @[email protected]
4 years
Go's built-in execution trace is amazing. Makes it easy to see parallel vs. serial tasks and CPU saturation. Here's esbuild running my JS bundling benchmark. Most things can be done in parallel. Just got symbol frequency analysis parallelized. Overall time is now 0.4s => 0.35s.
Tweet media one
3
17
184
@evanwallace
Evan Wallace | @[email protected]
4 years
Just published some documentation that describes how esbuild's parallel symbol minification algorithm works: . It's designed to be fast without using a lot of memory. Are their other parallel JavaScript minifiers? It would be interesting to compare notes.
Tweet media one
7
28
176
@evanwallace
Evan Wallace | @[email protected]
9 years
Just posted about vector networks, the idea behind Figma's pen tool: @figmadesign
10
70
163
@evanwallace
Evan Wallace | @[email protected]
4 years
This paper is pretty wild: "CSS Minification via Constraint Solving"
Tweet media one
6
20
158
@evanwallace
Evan Wallace | @[email protected]
3 years
@robpalmer2 @jarredsumner I think esbuild is probably within 5x of peak, but it’s definitely not peak. It’s pretty much a standard JS parser without many tricks, and uses GC. I'm guessing (and hoping!) that esbuild’s speed will be eclipsed by another production-ready bundler either this year or next.
4
8
145
@evanwallace
Evan Wallace | @[email protected]
3 years
Just discovered that the esbuild binary executable is inside the official VSCode app! This appears to be unintentional, so each person who downloads VSCode now also has an extra 7 MB or so of useless data. I wonder how many GB that adds up to worldwide...
4
13
145
@evanwallace
Evan Wallace | @[email protected]
3 years
This is a very exciting upcoming change to Yarn! It'll soon skip downloading incompatible optional dependencies, which can be a huge speedup. Many thanks to the Yarn team for the hard work to get this in.
@arcanis
Maël
3 years
Just landed one of my most complex Yarn PR in a while. Now os/cpu fields will cause packages to not be fetched anymore on incompatible systems, as expected by Esbuild and SWC 📦
3
10
99
1
10
145
@evanwallace
Evan Wallace | @[email protected]
4 years
I wrote up some notes about esbuild's architecture: . It includes internal details such as how parallelism is used, how various transforms happen in the parser, and how hybrid ES6 and CommonJS linking works with scope hoisting.
Tweet media one
1
14
119
@evanwallace
Evan Wallace | @[email protected]
4 years
Just discovered some more untapped optimization opportunities in esbuild. It now runs my main benchmark ~25% faster (0.54s => 0.4s). I really need to redo the benchmarks sometime...
5
6
104
@evanwallace
Evan Wallace | @[email protected]
4 years
Update: It has just been fixed!
1
3
83
@evanwallace
Evan Wallace | @[email protected]
4 years
Just came across this: . It’s a JS syntax corner case that esbuild gets wrong... along with V8, SpiderMonkey, JavaScriptCore, Babel, Flow, and others too. Props to TypeScript for getting it right! Anyway it’ll be fixed in the next version of esbuild.
2
4
82
@evanwallace
Evan Wallace | @[email protected]
4 years
I just started a list of esbuild plugins to make plugin discovery easier: . If you’d like for others to use your plugin, you should add it to this list!
0
12
80
@evanwallace
Evan Wallace | @[email protected]
2 years
Heads up that I'm currently posting on Mastodon instead of Twitter. You can find me here: @evanw @hachyderm .io
3
3
79
@evanwallace
Evan Wallace | @[email protected]
9 years
Just added a page on my site with interesting bits of shader code: http://t.co/IKGEzvPGwH
4
23
70
@evanwallace
Evan Wallace | @[email protected]
4 years
This is so cool. I love the way this style looks. Abstract but still very tree-like, especially in motion.
@viviariums
Vivian Wu
4 years
Real-time foliage generated from noise and ray marching, with seasonal variations in color and density. Demo:
1
45
286
0
3
74
@evanwallace
Evan Wallace | @[email protected]
4 years
I recently added code formatting support to my WebGL GLSL compiler toolchain: . It works with format-on-save in the Visual Studio Code extension: .
1
6
70
@evanwallace
Evan Wallace | @[email protected]
4 years
I'm trying to implement top-level await in esbuild such that the bundled code behaves the same as the unbundled code. Surprisingly I couldn't find an existing bundler that does this (see ). Does anyone know of one? Or know if I'm misunderstanding something?
5
3
70
@evanwallace
Evan Wallace | @[email protected]
4 years
I assumed Chrome's streaming JS parser would immediately start fetching parsed ES6 imports even while the rest of the script is still downloading, but it looks like I'm wrong. At least according to Chrome developer tools. Anyone know why this isn't done?
Tweet media one
7
6
65
@evanwallace
Evan Wallace | @[email protected]
3 years
It's a big deal for npm packages that come with binary executables. For example, esbuild has 17 optional dependencies, one for each supported platform. The latest Yarn 3.1 release candidate installs esbuild 6x faster for me (50s => 8s).
0
5
65
@evanwallace
Evan Wallace | @[email protected]
3 years
7 MB * 14,000,000 = 100 TB (yes terabytes) of esbuild
3
2
63
@evanwallace
Evan Wallace | @[email protected]
8 years
Just published an online font texture generator: . It uses jump flooding for fast signed distance field generation.
5
18
54
@evanwallace
Evan Wallace | @[email protected]
13 years
New demo: a pool of water rendered in WebGL with reflection, refraction, and caustics http://t.co/irgBE4d
5
76
48
@evanwallace
Evan Wallace | @[email protected]
3 years
Caveat: My benchmark measures worst-case production build time. A lot of the time for other bundlers is spent running a minifier written in JS (Terser). All of these times should improve when the ongoing port of Terser to Rust is completed in the future.
1
4
48
@evanwallace
Evan Wallace | @[email protected]
7 years
Just published a description of the algorithm Figma uses for robust object reordering in a multiplayer environment:
2
14
50
@evanwallace
Evan Wallace | @[email protected]
3 years
This is an easy mistake to make so don't read too much into it. It's easy to fix. I mainly just found it amusing that esbuild is now so widespread. Assuming VSCode has 14 million active users (according to a quick search), esbuild is now on many millions of developers' computers.
1
4
45
@evanwallace
Evan Wallace | @[email protected]
8 years
Ever wonder exactly how a floating-point number is represented? I just built to explore floating-point bit patterns.
4
20
40
@evanwallace
Evan Wallace | @[email protected]
9 years
Just hooked up my GLSLX compiler to Visual Studio @Code to get IDE goodies for WebGL shaders
1
22
40
@evanwallace
Evan Wallace | @[email protected]
3 years
@privatenumbr Also: props to the author of . It has such a massive scope and is a very impressive body of work. With all of the momentum it has, I expect it will one day be faster than esbuild!
2
1
37
@evanwallace
Evan Wallace | @[email protected]
2 years
It just uses macOS file system tags with Spotlight as an index, so there's no hidden tag database. Tags can be synced between computers using Dropbox. Nested tags are represented as a single tag with a "/" for each nesting level.
2
0
36
@evanwallace
Evan Wallace | @[email protected]
3 years
Notice how Parcel 2 got significantly faster on the TypeScript benchmark. Some bugs around TypeScript compilation were fixed and now Parcel's SWC-based TypeScript compiler written in Rust can be used instead of the old TypeScript transformer plugin written in JS. Exciting!
1
0
36
@evanwallace
Evan Wallace | @[email protected]
3 years
@frgx @paul_irish @mehulkar And name shortening is roughly the same work as the duplicate name collision detection and avoidance that happens when not minifying. TLDR: syntax compression time is insignificant, name shortening is no additional cost, and whitespace removal (not printing spaces) is a speedup.
1
2
34
@evanwallace
Evan Wallace | @[email protected]
8 years
We just released multiplayer editing in Figma! Real-time simultaneous editing for designers.
1
5
32
@evanwallace
Evan Wallace | @[email protected]
9 years
Wrote a new compiler this weekend that does type checking and minification of WebGL shader code: GLSLX http://t.co/yvLZ5HkrZi
2
15
31
@evanwallace
Evan Wallace | @[email protected]
4 years
Just had a bit of a debugging journey for esbuild. I was surprised to discover that both Chrome and Safari appear to have bugs with source map locations, even though source maps have been around for a long time. Bug repro: Context:
1
3
32
@evanwallace
Evan Wallace | @[email protected]
8 years
I'm very humbled to be included in this year's @Forbes #30Under30 . It's an honor to be among so many amazing people!
Tweet media one
3
2
31
@evanwallace
Evan Wallace | @[email protected]
13 years
Constructive solid geometry on meshes using BSP trees in JavaScript http://t.co/pwRgZJan
2
33
30
@evanwallace
Evan Wallace | @[email protected]
12 years
WebSocket speed fix for WebKit just landed, receiving 5 MB is now 20x faster http://t.co/AUe2YM0Z
4
70
31
@evanwallace
Evan Wallace | @[email protected]
9 years
I've been working on creating a programming language called Skew:
4
13
30
@evanwallace
Evan Wallace | @[email protected]
4 years
@znck0 It's inspired by that one. But I have a 30mb source map. That one loads in 75s and is 4ps after loading. Mine loads in 0.5s (150x faster!) and is 60fps after loading. The main bottleneck is using HTML to render everything. I'm using canvas instead.
1
2
26
@evanwallace
Evan Wallace | @[email protected]
9 years
Winter break project: a GPU-powered equation editor and graphing app:
2
18
26
@evanwallace
Evan Wallace | @[email protected]
8 years
Debugging Data Corruption with Emscripten: a particularly challenging debugging adventure of mine from a while back.
3
13
27
@evanwallace
Evan Wallace | @[email protected]
4 years
@imedadel_ I have some thoughts here: . Long story short: esbuild used to be written in Rust but Go won me over. I'm much more productive in Go. I'm sure Rust would be somewhat faster with enough effort, but not by that much and Go is much less effort in comparison.
0
0
22
@evanwallace
Evan Wallace | @[email protected]
11 years
Finally tidied up and published my page on obscure C++ features http://t.co/UMvMzPNX5K
3
12
25
@evanwallace
Evan Wallace | @[email protected]
4 years
Full release notes: . More improvements to tree shaking are coming. Issue: . Code splitting didn't make the cut for this release. The foundation is there and it will be coming in a future release. Issue: .
1
1
27
@evanwallace
Evan Wallace | @[email protected]
8 years
TIL that some monospace fonts have ligatures. Makes reading harder for me and isn't monospace anymore. I'm confused.
Tweet media one
3
10
24
@evanwallace
Evan Wallace | @[email protected]
3 years
Here are the previous benchmark results for comparison. The benchmark changed slightly since last time because I disabled macOS Spotlight this time so compare ratios, not absolute times. I didn't include Parcel 1 and Webpack 4 in the latest benchmark since they're now outdated.
Tweet media one
2
0
25
@evanwallace
Evan Wallace | @[email protected]
5 years
@brian_lovin @figmadesign Just pushed out a fix for this! Hopefully it works for you now.
2
0
25
@evanwallace
Evan Wallace | @[email protected]
4 years
This says "tree shaking" because it's a work-in-progress branch of mine. Tree shaking is working but isn't released yet. Still working on code splitting. When I get both of them working I'll release both of them together.
1
0
22
@evanwallace
Evan Wallace | @[email protected]
13 years
New lightgl.js example: ambient occlusion lightmap generation in WebGL http://t.co/MW0YRT2P
3
14
20
@evanwallace
Evan Wallace | @[email protected]
3 years
@paul_irish @mehulkar This is 100% true. CPU temperature and OS caches also affect timings and make benchmarking hard. But I’ve seen enabling minification make esbuild go a little faster too (which is counter-intuitive compared to other bundlers). So I think the result is correct despite the methods.
2
0
24
@evanwallace
Evan Wallace | @[email protected]
4 years
@TK20513509 I attempted to address that in the readme: * It's written in Go * Parsing, printing, and source map generation are all parallelized * Everything is done in just 3 passes w/o expensive transformations * Code is written with speed in mind and tries to avoid unnecessary allocations
1
2
22
@evanwallace
Evan Wallace | @[email protected]
3 years
Caveat: I was unable to reproduce the 3x speed-up mentioned in the announcement: , but the speed-up may depend on the CPU (I used an x86 processor with 6 cores while the announcement used an M1 processor with 8 cores).
1
0
22
@evanwallace
Evan Wallace | @[email protected]
3 years
@frgx @paul_irish @mehulkar Tweets are kind of short for this but I'll try. Minification is three parts: whitespace removal, syntax compression, and name shortening. Whitespace removal just means doing less work. Syntax compression is very fast and is done during parsing so the AST is fresh in the cache.
2
4
20
@evanwallace
Evan Wallace | @[email protected]
13 years
Just overhauled the lightgl.js API, a library that makes WebGL apps easy for those who know OpenGL http://t.co/XwhiWVDW
0
6
21
@evanwallace
Evan Wallace | @[email protected]
6 years
Our latest release of Figma includes a brand new rendering engine that's around 3x faster than the old one! It's been redesigned from the ground up for better performance. Really cool tech.
0
2
18
@evanwallace
Evan Wallace | @[email protected]
4 years
This release has a lot of new code. The bundler has been mostly rewritten. While I've already tested it a ton, more tests are always helpful. Please let me know on GitHub if you find any issues!
0
0
19
@evanwallace
Evan Wallace | @[email protected]
4 years
@youyuxi I would like to do whole-bundle const enum optimization in esbuild someday for what it's worth. Doesn't seem like it'd be too hard since esbuild has the original TypeScript source. We should probably start an issue to track it so we don't forget.
0
0
18
@evanwallace
Evan Wallace | @[email protected]
3 years
More details about the benchmarks can be found here if you are interested: .
1
0
19
@evanwallace
Evan Wallace | @[email protected]
4 years
I made one big type="module" script with many imports and set network emulation to Slow 3G. The waterfall shows Chrome waiting for the big script to finish downloading before fetching the imports. Shouldn't this be able to start earlier due to incremental parsing?
2
0
14
@evanwallace
Evan Wallace | @[email protected]
3 years
@privatenumbr Yes! It’s super exciting to see these kinds of large-scale investments in performance starting to happen. And it was all done on top of SWC, the underlying Rust library, so the whole community can benefit from the improvements.
2
0
15
@evanwallace
Evan Wallace | @[email protected]
4 years
@MarijnJH If you do this with a lot of objects you will have a lot of GC overhead. There are ways of implementing WeakMap without the GC overhead but modern JS VMs don’t use the efficient implementation: . We hit this and had to switch to mutating the objects.
0
1
16
@evanwallace
Evan Wallace | @[email protected]
8 years
Just tried writing a JS parser in @rustlang and C++. Rust compiler is 10x slower, had bad codegen bug. More details:
2
7
15
@evanwallace
Evan Wallace | @[email protected]
9 years
My programming language called Skew now has automatic typo correction in Visual Studio Code:
1
1
17
@evanwallace
Evan Wallace | @[email protected]
4 years
If there's no reason why this can't be done, then this could be a good optimization opportunity for Chrome (and other browsers). ES6 import statements are usually at the very top of the script.
3
0
12
@evanwallace
Evan Wallace | @[email protected]
4 years
@boubiyeah @znck0 No I don't actually. Sat down to an empty text file on Sunday. It's all one JavaScript file with no dependencies: . There's only one level of event propagation so that part wasn't complex.
2
0
14
@evanwallace
Evan Wallace | @[email protected]
3 years
@kdy1dev In case it helps: the UglifyJS test suite has been a pretty great source of minification edge cases for esbuild. Each test is small, and many have expected stdout text that's different if something is wrong. Here's my script for running esbuild on them:
1
1
14
@evanwallace
Evan Wallace | @[email protected]
9 years
With the C++ backend, the Skew compiler compiles itself to optimized JavaScript in 108ms (748kb of source, 6.8mb/s)
0
6
14