aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/phpstan
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-23 11:48:01 +0900
committernsfisis <nsfisis@gmail.com>2026-08-23 12:00:07 +0900
commit2f07bd12c0c77e8985646a9f21a62a91311d82c0 (patch)
tree92f995eee73d58b38a850f8ba9b0ab09d8a59f3a /crates/shirabe/src/phpstan
parent88b5c4b9c5f7941292b918b6eefe54947c4a0d96 (diff)
downloadphp-shirabe-2f07bd12c0c77e8985646a9f21a62a91311d82c0.tar.gz
php-shirabe-2f07bd12c0c77e8985646a9f21a62a91311d82c0.tar.zst
php-shirabe-2f07bd12c0c77e8985646a9f21a62a91311d82c0.zip
perf(filesystem): delete directories without spawning rm -rf
Composer shells out to `rm -rf` because PHP has no recursive directory removal. Rust has one, and every package installed from a dist archive pays for a removal: the extraction pipeline drops its temporary directory once per package, and uninstalling a package removes its whole tree. The asynchronous path goes through `tokio::fs` rather than `std::fs`, so the walk runs on a blocking thread and the sibling installs the reactor is driving keep making progress, the way they did while the subprocess was working. Installing laravel/laravel (109 packages) from a warm cache drops from 3.85 to 3.19 CPU seconds. The removals run concurrently, so on an idle 16-core machine they never reach the critical path and wall time is unchanged at 1.65 s; pinned to two cores it falls from 2.33 s to 2.20 s. Pruning the 33 dev packages with `install --no-dev`, where whole package trees are removed rather than empty temporary directories, drops from 844 ms to 806 ms even on 16 cores. Windows keeps the `rmdir /S /Q` subprocess, and both platforms keep falling back to `remove_directory_php` when the fast path does not clear the directory. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/phpstan')
0 files changed, 0 insertions, 0 deletions