Performance: Creating and removing directories
MEDIUM IMPACT
This affects the file system operations impacting page load speed when server-side rendering or during build processes that create or remove directories.
import { mkdir } from 'fs/promises'; await mkdir('./newDir');
const fs = require('fs'); fs.mkdirSync('./newDir');
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Synchronous directory operations | 0 (server-side) | 0 | 0 | [X] Bad |
| Asynchronous directory operations | 0 (server-side) | 0 | 0 | [OK] Good |