Tagged articles
9 articles
Page 1 of 1
James' Growth Diary
James' Growth Diary
Apr 26, 2026 · Backend Development

How Claude Code Achieves Sub‑Second Cold Starts with Lazy Loading and Compile‑Time Feature Gating

The article dissects Claude Code's sub‑second cold‑start performance by detailing its lazy‑loading mechanism, compile‑time feature‑gate (DCE) via bun:bundle, runtime gating with GrowthBook, and the engineering trade‑offs of managing over 88 feature flags in a single‑file CLI bundle.

BunCLIPerformance Optimization
0 likes · 16 min read
How Claude Code Achieves Sub‑Second Cold Starts with Lazy Loading and Compile‑Time Feature Gating
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jul 12, 2025 · Frontend Development

Master Tree Shaking: Eliminate Dead Code and Shrink Your Frontend Bundles

This article explains the principles of Tree Shaking, outlines prerequisites, demonstrates common pitfalls such as CommonJS usage, object aggregation, indirect re‑exports, side‑effect modules, and dynamic properties, and provides practical ways to verify that dead code has been successfully removed from your bundle.

ES ModulesFrontend OptimizationTree Shaking
0 likes · 8 min read
Master Tree Shaking: Eliminate Dead Code and Shrink Your Frontend Bundles
Sohu Tech Products
Sohu Tech Products
Jan 15, 2025 · Frontend Development

Tree Shaking in React.js: Principles, Best Practices and Applications

Tree shaking in React.js leverages ES6 static imports and named exports to eliminate dead code, reducing bundle size and improving load performance, while best practices such as modular design, avoiding side effects and dynamic imports ensure optimal dead‑code elimination across components and libraries.

Code OptimizationES6 ModulesReact.js
0 likes · 7 min read
Tree Shaking in React.js: Principles, Best Practices and Applications
Architecture Development Notes
Architecture Development Notes
Aug 15, 2024 · Fundamentals

How Go’s Compiler Shrinks Binaries with Dead Code Elimination

This article explains Go’s dead code elimination (DCE) optimization, demonstrates it with sample code, shows how to inspect compiled binaries using go tool nm, and discusses factors that affect DCE such as code complexity, compiler flags, and reflection, helping developers reduce binary size.

Compiler OptimizationGobinary size
0 likes · 6 min read
How Go’s Compiler Shrinks Binaries with Dead Code Elimination
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Dec 2, 2022 · Frontend Development

How to Analyze and Optimize Frontend Bundle Size with a DIY JS Parser

This article walks through measuring bundle growth, identifying duplicate dependencies and missing tree‑shaking, building a Go‑based JavaScript parser, generating a dependency graph, handling conditional imports, applying dead‑code elimination, and finally using the tool to shrink frontend bundle size.

Tree Shakingbundledead code elimination
0 likes · 35 min read
How to Analyze and Optimize Frontend Bundle Size with a DIY JS Parser
ByteDance Web Infra
ByteDance Web Infra
May 13, 2022 · Frontend Development

Understanding Tree Shaking, Dead Code Elimination, and Side Effects in JavaScript Bundlers

Tree shaking, a subset of dead‑code elimination based on ES2015 module syntax, removes unused top‑level code, while side‑effect analysis determines which modules can be safely omitted; this article explains the terminology, algorithms, safety vs optimization trade‑offs, and practical debugging steps for modern JavaScript bundlers.

JavaScript bundlersTree Shakingdead code elimination
0 likes · 19 min read
Understanding Tree Shaking, Dead Code Elimination, and Side Effects in JavaScript Bundlers
ByteFE
ByteFE
Aug 31, 2021 · Frontend Development

Understanding Tree Shaking in Webpack: Theory, Implementation, and Best Practices

This article explains the concept of Tree Shaking as a dead‑code elimination technique based on ES Modules, details how to enable it in Webpack, describes the underlying implementation steps, and provides practical tips for writing tree‑shakable code while avoiding common pitfalls.

ESMTree Shakingdead code elimination
0 likes · 14 min read
Understanding Tree Shaking in Webpack: Theory, Implementation, and Best Practices
JD Tech
JD Tech
Mar 5, 2019 · Frontend Development

Optimizing Taro H5 Bundle Size with Tree Shaking and ES Module Refactoring

This article explains how Taro's H5 build size was dramatically reduced by applying dead‑code elimination, configuring sideEffects, converting component and API packages to ES modules, and using webpack's tree‑shaking together with a custom Babel plugin to replace default imports with named imports.

Babel PluginES ModulesPerformance Optimization
0 likes · 11 min read
Optimizing Taro H5 Bundle Size with Tree Shaking and ES Module Refactoring