Performance: Local disk storage
MEDIUM IMPACT
Local disk storage affects how fast your application can read and write files, impacting response time and user experience when accessing stored data.
<?php
// Queue file save to run asynchronously
dispatch(function() use ($content) {
Storage::disk('local')->put('file.txt', $content);
});
?><?php // Synchronous file save inside request Storage::disk('local')->put('file.txt', $content); ?>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Synchronous file write during request | 0 | 0 | Blocks server response delaying paint | [X] Bad |
| Asynchronous file write via queue | 0 | 0 | Non-blocking server response, faster paint | [OK] Good |