yceffort
07 POSTS

Javascript 1

  • #web-performance#javascript#browser

    I Grew Never-Executed JavaScript to 10MiB

    How much do you lose when 10MiB of functions you never call ships to the browser? I ran 855 measurements to separate the cost of file size from the cost of code shape. Uncalled declarations cost about 21ms per MiB, while initialization code that runs the moment the file is read took 201ms per MiB on the main thread. With real libraries, merely importing a module was enough to evaluate it.

    32 min read
  • #debugging#bundler#nextjs

    Next.js Turbopack Turned One Singleton into Two: A Scope Hoisting Bug and a Circular Import

    In a Next.js 16 Turbopack production build, a module-scope singleton became two live instances at runtime. Inside the same synchronous block, one condition contradicted the other, and responses that arrived in 30ms still timed out. I found the cause by following a partial scope hoisting merge and a circular import through the bundle output, and confirmed the same bug had already been fixed upstream.

    16 min read
  • #nodejs#security#javascript

    The Pitfalls of Node.js vm Module: Why It's Not a Sandbox

    A preview of section 5.2 (Pitfalls of the vm Module) from the upcoming Node.js Deep Dive book.

    14 min read
  • #memory#web-performance#design-patterns

    Preventing Memory Leaks with IntersectionObserver Singleton Pattern and WeakMap

    How to efficiently observe hundreds of elements while preventing memory leaks

    13 min read
  • #web-performance#memory#async

    How to Efficiently Process Massive JSON Responses

    How to survive when JSON.parse() becomes overwhelming

    18 min read
  • #error-handling#javascript#async

    Handling Uncaught Async Errors in JavaScript Correctly

    Why try...catch misses errors thrown in async functions, and how to handle every case: IIFEs, forEach, promise chains, constructors, event listeners, and global safety nets.

    12 min read
  • #compiler#javascript

    Understanding AST for JavaScript Developers (2026 Update)

    A comprehensive guide covering AST concepts, parsing process, key node types, and practical usage in tools like Babel and ESLint.

    13 min read