Joyee Cheung Profile
Joyee Cheung

@JoyeeCheung

Followers
3,824
Following
846
Media
212
Statuses
2,689

She/Her. My brain is full of food, plants, museums, languages, and code fragments from V8 & Node.js.

Joined August 2012
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
@JoyeeCheung
Joyee Cheung
2 years
I wrote a blog post about the optimization of new class features in @v8js that has also been included in the recent @nodejs 18.0.0 release 🎉
4
42
208
@JoyeeCheung
Joyee Cheung
5 years
Woke up to an accepted @v8js committer nomination today 😊 Thank you to everyone who have helped me along the way!
18
13
156
@JoyeeCheung
Joyee Cheung
4 years
Just landed a new flag in Node.js - e.g node --heapsnapshot-near-heap-limit=3 to take up to 3 snapshots when the heap is on the edge of OOM so you can compare and see what objects are allocated before the Node.js instance crashes due to OOM
4
28
135
@JoyeeCheung
Joyee Cheung
4 months
Landed a PR to enable ccache-like env var for caching Node.js module compilation. Numbers from folks trying an earlier version of this: tsc --version: ~90ms -> ~40ms yarn --version: ~165ms -> ~115ms npm run echo (bundled by ncc): ~150ms -> ~110ms
4
20
131
@JoyeeCheung
Joyee Cheung
9 months
If you are stuck on 16 because of the 100x perf regression/memory leak of vm.Script compilation (or just Jest users getting stuck on 16 due to perf reasons/memory leak), the fix/workaround is in 20 now (v18 backport is WIP)
@nodejs
Node.js
9 months
New Node.js v20.10.0 'Iron' (LTS) release up now ⚡💚 Details here:
17
167
908
2
35
108
@JoyeeCheung
Joyee Cheung
6 years
Today is my last day at Alibaba. It has been an amazing experience working with some of the best Node.js developers in China. 🙏
4
3
77
@JoyeeCheung
Joyee Cheung
5 months
New blog posts (a series again because it became too long and should be split for readability again 🤪): Memory leak regression testing with V8/Node.js, part 1 - memory usage-based testing
3
17
80
@JoyeeCheung
Joyee Cheung
2 years
No more confusing "native modules" in Node.js: from now on built-in JS modules in Node.js are called "built-in modules" and the the dynamically-linked shared objects loaded into the Node.js prcesses are called "addons":
7
25
75
@JoyeeCheung
Joyee Cheung
10 months
Working on my @NodeConfEU talk and I start to question if I can really squeeze all these into 25 minutes 🥹....✂️✂️✂️
Tweet media one
7
5
73
@JoyeeCheung
Joyee Cheung
3 years
Managed to get the TypeScript compiler up and running with the Node.js user land snapshot prototype
Tweet media one
2
7
66
@JoyeeCheung
Joyee Cheung
2 years
Just landed it as a build-time feature (i.e. embedding a bundled app into the binary if you compile Node.js from source). Looking into making it a run-time feature (i.e. generating/loading app snapshots from disk with the official Node.js binary)
@JoyeeCheung
Joyee Cheung
3 years
Managed to get the TypeScript compiler up and running with the Node.js user land snapshot prototype
Tweet media one
2
7
66
3
18
61
@JoyeeCheung
Joyee Cheung
4 months
The Node.js collaboration summit seemed to work out pretty well. Trying to write a document/blog post about what I learned co-organizing it. It was great working on this with @littledan @matteocollina @TChetwin et al, and thanks @TechAtBloomberg for the amazing support!
0
15
57
@JoyeeCheung
Joyee Cheung
3 months
So happy to see the first bug report of require(esm) after the v22 release that I started fixing it in the train station and opened a PR on the train 🥹 The more battle-tested it is, the quicker it can graduate to stable!
1
5
54
@JoyeeCheung
Joyee Cheung
2 years
I will be giving a talk at #NodeCongress about Node.js startup snapshots. Can't wait to see some friendly faces that I haven't seen for a long time in Berlin! 🥰 @NodeCongress
1
7
54
@JoyeeCheung
Joyee Cheung
10 months
For my own research into "why is the ESM loader creating so many promises", I implemented a local --trace-promises flag and..it creates 65 promises to load empty.mjs 🫣 (maybe this should be upstreamed as an internal flag to help paying attention to this in core)
Tweet media one
Tweet media two
@bengl
Bryan English (💉💉💉💉💉)
10 months
@ThePrimeagen @stephenbelanger To make this easy, I made this promise counting library! This checks how many promises are created between two points in code. You can even isolate to an async continuation to filter out noise, or get the callsites of created promises!
0
2
15
3
8
54
@JoyeeCheung
Joyee Cheung
6 years
The first version of the JS API of llnode (as a normal Node.js addon) just landed! Thanks to the the reviewers in each iteration and @rnchamberlain for the original work, also h/t to the N-API team: it got much simpler after being rewritten with N-API!
1
15
52
@JoyeeCheung
Joyee Cheung
6 months
Landed a new crypto.hash() API in Node.js for one-shot hashing, for small (<5MB) and readily available data it can be 1.2-2x faster than using crypto.createHash() (for bigger inputs, streaming via crypto.createHash() is still preferred).
4
7
49
@JoyeeCheung
Joyee Cheung
5 years
What do you think about adding a CLI flag to Node.js that profiles the application during the length of its lifetime and writes the CPU profile to disk before it exits? (similar to --prof, but backed by the better-supported v8 CPU profiler)
6
11
47
@JoyeeCheung
Joyee Cheung
2 years
Just landed an experimental V8 startup snapshot JS API in Node.js for specifying (de/)serialization callbacks as well as main functions for the deserialized app 🎉 (only available for build-time snapshots for now, runtime snapshot is WIP)
Tweet media one
Tweet media two
2
9
46
@JoyeeCheung
Joyee Cheung
5 years
Slides for my talk about Web APIs in Node.js core @jsconfeu Thanks @littledan @jasnell @MylesBorins for helping me improve the talk (as well as work on spec & implementations that I've mentioned in the talk)!
2
19
44
@JoyeeCheung
Joyee Cheung
6 years
I've been asked about this quite a few times lately, so in case you want to know how to become a @nodejs core collaborator (who has commit access to the nodejs/node GitHub repo and CI access for PRs), this is where the process is documented:
0
21
44
@JoyeeCheung
Joyee Cheung
1 year
Slides for my talk @NodeCongress 2023 "Startup snapshots in Node.js":
1
7
45
@JoyeeCheung
Joyee Cheung
6 years
Landed a PR on Node.js master to share the code cache of builtin modules & bootstrappers compiled among the main thread & worker threads so launching workers can be ~2x faster than launching child processes (thanks @addaleax for the review!)
1
14
43
@JoyeeCheung
Joyee Cheung
2 years
畢竟西湖六月中,風光不與四時同。 接天蓮葉無窮碧,映日荷花別樣紅。
Tweet media one
Tweet media two
Tweet media three
Tweet media four
1
1
42
@JoyeeCheung
Joyee Cheung
7 years
Me: I am going to Tokyo next month My sister: that's not the kind of life that I imagine a programmer will have
1
4
40
@JoyeeCheung
Joyee Cheung
5 months
Landed a new v8.queryObjects() API similar to the one in Chrome DevTools’ console, which allows searching for objects with a matching prototype on its prototype chain. Useful for testing against memory leaks (what it was used for internally in Node.js)
1
11
39
@JoyeeCheung
Joyee Cheung
5 years
I am going to give a talk about how to contribute to Node.js core at the code-and-learn event in Beijing this month. What do you think I should cover in my talk? I am trying to be technical and practical in the talk, with topics like
4
5
37
@JoyeeCheung
Joyee Cheung
7 years
Slides for my talk at @nodefest is up: #nodefest
0
18
37
@JoyeeCheung
Joyee Cheung
5 years
Slides for my talk about the bootstrap of Node.js core at the OpenJS collaboration summit:
0
6
36
@JoyeeCheung
Joyee Cheung
9 months
Slides for my talk "JavaScript and C++ in Node.js core - How do they talk to each other?" @NodeConfEU
0
9
36
@JoyeeCheung
Joyee Cheung
6 years
I am going to give a talk at #NodeJSInteractive tomorrow on post-mortem diagnostics in JS - or, how we teach lldb to understand the v8 object model - and the JS API of llnode. Check it out if you are at the conference and are also interested in debuggers!
1
10
34
@JoyeeCheung
Joyee Cheung
6 years
I was reminded again why I didn't go to local tech meetups anymore yesterday. There will always be guys making a big deal out of a female programmer being anywhere near competent. Then there will be questions about if she's single. It's sad but it's a prevalent thing here.
5
5
31
@JoyeeCheung
Joyee Cheung
6 months
Just moved the stability index of Node.js single executable applications from "Experimental: This feature is being designed and will change" to "Active development" as the design is less likely to change now (still many feature requests left tho)
0
9
33
@JoyeeCheung
Joyee Cheung
6 years
Slides for my talk "Bringing JavaScript Back to Live" at #NodeJSInteractive are up!
1
12
33
@JoyeeCheung
Joyee Cheung
6 years
I implemented the automatic leak detection algorithm used by Eclipse's MAT on V8 heap snapshots as a Node.js CLI. See the test/fixtures directory for common types of leaks that it can help to identify
1
11
31
@JoyeeCheung
Joyee Cheung
5 years
这周日我会去在浙大玉泉举办的 Node 地下铁做一个关于 Node.js 启动的分享。 I am going to give a talk about Node.js bootstrap at Node subway hosted at the Yuquan Campus of Zhejiang University this Sunday.
1
0
31
@JoyeeCheung
Joyee Cheung
10 months
Apart from optimizations and features, there are long-standing bugs in Node.js like & that affected many users but didn't get enough dedications to fix due to complexity. I am grateful that Bloomberg allowed me to work on them ❤️
@littledan
Daniel Ehrenberg
10 months
Bloomberg invests in Node.js Core. Shouldn't you? In this blog post, I wrote about our sponsorship of: - @JoyeeCheung as a Node TSC member - @AndreuBotella working on AsyncContext, supporting observability - @NicoloRibaudo accelerating modules with `import defer`
1
14
85
1
5
31
@JoyeeCheung
Joyee Cheung
9 months
Weekend nerd-sniping ends with "oh it's GC underperforming in a microbenchmark that allocates in a tight loop...again" & "oh it's JS string -> embedder buffer conversions being slow...again"
2
2
29
@JoyeeCheung
Joyee Cheung
6 years
Special release of node-core-utils, @ v1.13.0: a tool that automatically grabs test failures and their reasons from their CI and display it (+ write a pastable markdown to your clipboard!) Demo:
1
10
29
@JoyeeCheung
Joyee Cheung
5 years
Was excited to see many new faces at the OpenJS collaboration summit and the regular Node.js crowd :3 Many thanks to the organizers @ladyleet @evahowe @jorydotcom @keywordnew @matteocollina et al!
1
5
28
@JoyeeCheung
Joyee Cheung
2 years
Plum blossoms in Hangzhou
Tweet media one
Tweet media two
Tweet media three
Tweet media four
2
0
26
@JoyeeCheung
Joyee Cheung
5 months
Arriving in London ahead of the Node.js collaboration summit 🛬
1
0
27
@JoyeeCheung
Joyee Cheung
2 years
Just landed a PR in Node.js that allows DevTools to display detached embedder objects in the heap snapshots differently - with the script below, the Node / Blob object is detached (only held alive by JS) initially, then attached (held alive by C++) after URL.createObjectURL()
Tweet media one
Tweet media two
Tweet media three
1
5
27
@JoyeeCheung
Joyee Cheung
2 years
秋分🍃
Tweet media one
Tweet media two
Tweet media three
Tweet media four
3
0
26
@JoyeeCheung
Joyee Cheung
6 years
Tips: you can use to easily download/update and install the latest d8 binaries so there is no need to compile it from source!
@bmeurer
Benedikt Meurer
6 years
One of these areas in @NodeJS where help would be highly appreciated is triaging performance issues that are potentially related to V8. Like for example which had been open for a while. Just coming up with a repro for d8 would make a _huge_ difference!
0
8
16
1
5
24
@JoyeeCheung
Joyee Cheung
4 months
Tried not to look at GitHub this weekend and failed catastrophically…well at least I did manage to stare at some things that are unrelated to computers.
Tweet media one
Tweet media two
Tweet media three
Tweet media four
1
1
25
@JoyeeCheung
Joyee Cheung
5 months
两个广东人在伦敦吃川菜是一种怎样的体验….(不是我的主意😅)
Tweet media one
Tweet media two
Tweet media three
4
0
25
@JoyeeCheung
Joyee Cheung
6 years
Oh wow the C++ wrappers of N-API are much easier to use than NAN/the V8 API. Kudos to everyone who worked on the initiative!
4
6
23
@JoyeeCheung
Joyee Cheung
3 months
@jasnell @codebycruz @littledan @jarredsumner @yagiznizipli If anything, unhealthy discussions on social media would only make people like me who are mostly blocked by social barriers less motivated to improve ESM in Node.js, not more
1
3
24
@JoyeeCheung
Joyee Cheung
9 months
A 🌈 appears around the train ride to @NodeConfEU
Tweet media one
0
0
24
@JoyeeCheung
Joyee Cheung
3 years
From a recent conversation I realize that Node.js user land snapshot could be useful even without support for loading other user modules (because there are bundlers), so maybe it would be nice to have an experimental prototype landed first while working on further support..🤔
Tweet media one
2
3
24
@JoyeeCheung
Joyee Cheung
3 months
@fengmk2 之前往npm放武林外传的年代久远也就算了,这回居然直接放正在播的剧….版权还是鹅的….
0
0
22
@JoyeeCheung
Joyee Cheung
6 years
llnode @ v1.7.0 - Detailed output with `v8 findjsobjects -d` - Fix `v8 bt` with v8 6.4 (still broken on 6.5+) - Build file refactors, might fix some bugs on some Linux distros and FreeBSD
1
11
21
@JoyeeCheung
Joyee Cheung
9 months
Me after writing ~250 lines of tests: I don't expect this to just pass at the first attempt, let me compile it and run it with the debugger ...but it passed o.O
2
0
23
@JoyeeCheung
Joyee Cheung
2 years
Spring has arrived in Hangzhou 🌸
Tweet media one
Tweet media two
Tweet media three
Tweet media four
2
0
22
@JoyeeCheung
Joyee Cheung
6 years
If you are a member of the @nodejs organization (including collaborators, WG/team members) considering going to Vancouver for JS Interactive/collab summit this October, please participate in this survey so we can plan ahead for the cost & space needed!
1
17
23
@JoyeeCheung
Joyee Cheung
6 years
Writing a slow but effective tool for finding out the correct order to backport Node.js PRs with the least amount of conflicts possible...
Tweet media one
6
4
22
@JoyeeCheung
Joyee Cheung
10 months
I wrote a handwavy explanation about how the fixes in Node.js v21.1.0 lowered memory usage and run time of Jest tests (maybe in other frameworks compiling scripts the same way too) - in case I never manage to finish a less handwavy blog post about them..😂
@JoyeeCheung
Joyee Cheung
1 year
hmm so that was still wrong, and reverted a while ago, and then while I was working on something else related to memory, this came up to me … so giving it a try again..
1
1
15
1
0
22
@JoyeeCheung
Joyee Cheung
3 months
Apparently I looked gloomy when sinking into my thoughts on a plane, even the flight attendant asked “are you okay? You look so sad”… Good news is I got the ticket to a museum I have wanted to visit for a long time so I got better things to stare at for the weekend 🤓
0
0
22
@JoyeeCheung
Joyee Cheung
5 years
I wrote some lengthy gibberish about my 2019
4
4
22
@JoyeeCheung
Joyee Cheung
6 years
As someone who submitted her first PR to Node.js (and first PR to a big open source project) at a code-and-learn event and have been sticking around for ~2 years and counting, I want to thank everyone who have contributed to this mission :)
@jasnell
James M Snell
6 years
I always enjoy code and learn. Even if most of these folks never contribute to node.js again, for many this is their first time contributing to any open source. The excitement when that pr is opened is beautiful to see.
2
7
45
0
5
22
@JoyeeCheung
Joyee Cheung
5 years
Starting from 14:15 today there will be three Node.js talks in a row in the side track of @jsconfeu from @indutny , myself and @joe_sepi !
Tweet media one
0
9
20
@JoyeeCheung
Joyee Cheung
7 years
I am making a CLI alternative to node-reivew. Browesr extentions are friendly but can't really use for automation🤔
Tweet media one
4
1
20
@JoyeeCheung
Joyee Cheung
7 years
As someone who have never contributed to a large OSS project/used English as working language before getting involved in Node.js, I've learned a great deal from @trott (and others) about communication and empathy 😊
0
4
21
@JoyeeCheung
Joyee Cheung
8 months
Managed to finish a few blog posts before 2023 ends! Part 1: analysis of the memory leaks and use-after-frees and the attempted & reverted fix
@JoyeeCheung
Joyee Cheung
10 months
I naively thought about writing a blog post after the fixes are landed and released, but then an endless thread of adjacent long-standing bugs just keep coming in 🥹
4
0
6
1
1
21
@JoyeeCheung
Joyee Cheung
8 months
Some interesting finding from my little adventure into crypto.createHash() performance (these are based on microbenchmarks that hash 10-100K buffer/strings of 10-100 bytes in a tight loop so validity of the numbers vary considering impact of GC) 🧵
2
5
20
@JoyeeCheung
Joyee Cheung
5 years
New tricks necessary for debugging v8 with lldb recently: To map the source: (lldb) settings set target.source-map "../../" "/path/to/v8/dir" Somehow v8::internal::Object is now ambiguous, so: (lldb) p _v8_internal_Print_Object(*((void**)(v8_local.val_)))
1
6
19
@JoyeeCheung
Joyee Cheung
3 months
@jasnell @codebycruz @littledan @jarredsumner @yagiznizipli I have talked about why I dared to work on ESM now, but not before here. There are things inspired by Bun in Node.js, but require(esm) isn’t one of those. The group who worked on ESM in Node.js before mostly consist of different people.
@JoyeeCheung
Joyee Cheung
4 months
@naugtur @ScriptedAlchemy I think it would still happen without me. ESM spec was already made conditionally synchronous in 2019 thanks to bundlers making case for that semantics. It just needs sb who knows this and dares to work on the energy-draining Node.js ESM loader and knows a bit about V8 to do it…
2
0
14
1
2
20
@JoyeeCheung
Joyee Cheung
4 months
This supports both CJS and ESM. More background in , this is part of a larger effort to finally sunset CJS module loader monkey patching (which the npm package v8-compile-cache does, and also why it doesn't support ESM or import())
1
1
20
@JoyeeCheung
Joyee Cheung
5 years
I did a talk at the OpenJS collaboration summit last month about some of the details of this work and future work (snapshotting as much bootstrap as possible is still WIP):
@littledan
Daniel Ehrenberg
5 years
I'm thrilled to see this sophisticated work from @JoyeeCheung on improving Node startup time with V8 snapshots finally shipping.
1
13
47
1
8
19
@JoyeeCheung
Joyee Cheung
9 months
Now that @mhdawson1 (who’s been tweeting about the talks at @NodeConfEU ) is on stage himself, here is a pic of him talking about how to build native addons like it’s 2023 and a bit of history of the evolution of addon development
Tweet media one
0
4
20
@JoyeeCheung
Joyee Cheung
5 months
@rough__sea Theoretically it would’ve been preventable if other maintainers/reviewers noticed that the code was suspicious. AFAICT the problem happened in a project with very few maintainers and there was pressure to add the attacker as maintainer.
2
0
17
@JoyeeCheung
Joyee Cheung
2 years
@robpalmer2 @_rafaelgss I confirm that with Node.js master (v8 9.8) the performance cliff between class fields and traditional properties is gone - private symbols are still slower since there's no type feedback for them, but they are unstable APIs that users should not rely on anyway.
Tweet media one
0
5
20
@JoyeeCheung
Joyee Cheung
6 years
Random idea: how about at the next code and learn event, we teach participants to backport PRs? Some medium or small sized PRs can give you a lot of insights into how core works than test changes. Can be a good second task. @trott @addaleax
3
2
19
@JoyeeCheung
Joyee Cheung
4 years
👀
Tweet media one
1
1
18
@JoyeeCheung
Joyee Cheung
9 months
Remote participation of the collaborator meeting at NodeConf () wasn’t set up, though it wasn’t any kind of decision making meeting, some interesting discussions happened, so here's my recap for folks who were not able to be there 🧵
1
4
19
@JoyeeCheung
Joyee Cheung
2 years
Removing 3 global object interceptor calls from vm.createContext() (one with the help of snapshot), makes it 12% faster - I knew that interceptor calls are slow but I didn't expect them to be that slow. 🧐 If you are using vm contexts, be sure to cache access to the globals.
Tweet media one
3
3
19
@JoyeeCheung
Joyee Cheung
7 years
Seeing all the NodeConf EU tweets gives me so much FOMO
3
2
18
@JoyeeCheung
Joyee Cheung
6 months
🥟
Tweet media one
Tweet media two
1
0
18
@JoyeeCheung
Joyee Cheung
6 years
A really long-overdue node-core-utils release..v1.14.0: - Various fixes and improvements to ncu-ci - Better state handling in git-node land Please update if you use the npm release!
0
3
17
@JoyeeCheung
Joyee Cheung
5 years
The Node.js collaborators in China are going to organize a Node.js Code + Learn on the second day of COSCon, Nov. 2-3 in Shanghai! 坐标在中国的 Node.js Collaborators 们打算在 11 月 2-3 日上海的 COSCon 第二天组织一个 Node.js Code + Learn! 🥰
1
8
18
@JoyeeCheung
Joyee Cheung
6 years
I am surprised that I have not seen much mention about the recent package-maintenance () effort led by @mhdawson1 today in my TL.. background: People are aware and there's tons of work open to everybody who wants to help!
1
9
18
@JoyeeCheung
Joyee Cheung
6 years
Nearly forgot this: I gave a presentation on the status of llnode during the Node.js diagnostics summit. here are the slides in case there are users who want to know what's going on there
0
9
16
@JoyeeCheung
Joyee Cheung
8 months
Writing blog posts while I wait for a ⛴️
Tweet media one
2
0
17
@JoyeeCheung
Joyee Cheung
6 months
Picking up CI gardening Friday again and trying to fix...8 (?) flakes and isolating 1 flake ($%@$! to go, can't count, don't want to count 🥺)
2
0
17
@JoyeeCheung
Joyee Cheung
5 months
@NicoloRibaudo (Still need to wait a bit until this is no longer under —experimental-require-module, so please try it and report any bugs to help making that happen!)
0
1
17
@JoyeeCheung
Joyee Cheung
5 years
IDK why but I always thought that Node.js links to v8_monolithic, until I read the gyp files and realized that it doesn't (it links to a bunch of other libs that v8_monolithic consists of). Then I realized that I already knew this >1 year ago and wrote about it in a doc🤦‍♀️
2
0
17