Performance: Built-in modules overview
MEDIUM IMPACT
This affects the initial load time and runtime performance by controlling how much code is loaded and executed from Node.js core modules.
import { readFileSync } from 'fs'; readFileSync('file.txt', 'utf8');
import fsExtra from 'fs-extra'; fsExtra.readFileSync('file.txt', 'utf8');
| Pattern | Module Size Impact | Load Time | Memory Usage | Verdict |
|---|---|---|---|---|
| Using external package for core functionality | Adds 20-50kb+ | Slower startup | Higher memory | [X] Bad |
| Using Node.js built-in module | No extra size | Fast startup | Lower memory | [OK] Good |