Skip to content

Commit 6e50c5d

Browse files
committed
Drop child process adapter
While fully non-blocking the child process adapter is a factor 100 slower than all the other adapters combined, including the blocking fallback adapter. As such removing it wil increase performance for everyone not having ext-uv or ext-eio (coming in a follow-up PR) installed. Even at the cost of blocking for a short period of time.
1 parent 41fefa4 commit 6e50c5d

File tree

10 files changed

+34
-360
lines changed

10 files changed

+34
-360
lines changed

README.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* [Factory](#factory)
1717
* [create()](#create)
1818
* [Filesystem implementations](#filesystem-implementations)
19-
* [ChildProcess](#childprocess)
2019
* [Uv](#uv)
2120
* [AdapterInterface](#adapterinterface)
2221
* [detect()](#detect)
@@ -102,26 +101,15 @@ an implementation detail.
102101
You should use the [`Factory`](#factory) to automatically create a new instance.
103102

104103
The factory will determine the most performant filesystem for your environment. Any extension based filesystem are
105-
preferred before falling back to less performant filesystems. When no extensions are detected it will fall back to
106-
the [`ChildProcess`](#childprocess) on Linux/Mac machines, and to an internal fallback filesystem for windows that
107-
uses blocking system calls. This blocking filesystem isn't documented and will be removed once
108-
the [`ChildProcess`](#childprocess) filesystem works on Windows. It's merely mentioned here for reference until then.
104+
preferred before falling back to less performant filesystems. When no extensions are detected it will fall back to an
105+
internal fallback filesystem that uses blocking system calls. As such it is highly recommended to install one of the
106+
extensions that unlocks more performant filesystem operations.
109107

110108
Advanced! If you explicitly need a certain filesystem implementation, you can
111109
manually instantiate one of the following classes.
112110
Note that you may have to install the required PHP extensions for the respective
113111
event loop implementation first or they will throw a `BadMethodCallException` on creation.
114112

115-
#### ChildProcess
116-
117-
A [`child process`](https://reactphp.org/child-process/) based filesystem.
118-
119-
This uses the blocking calls like the [`file_get_contents()`](https://www.php.net/manual/en/function.file-get-contents.php)
120-
function to do filesystem calls and is the only implementation which works out of the box with PHP.
121-
122-
Due to using child processes to handle filesystem calls, this filesystem the least performant is only used when no
123-
extensions are found to create a more performant filesystem.
124-
125113
#### Uv
126114

127115
An `ext-uv` based filesystem.

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"react/event-loop": "^1.2",
1818
"react/promise": "^2.8",
1919
"react/promise-stream": "^1.2",
20-
"react/stream": "^1.2",
21-
"wyrihaximus/react-child-process-promise-closure": "^1.0"
20+
"react/stream": "^1.2"
2221
},
2322
"require-dev": {
2423
"clue/block-react": "^1.4",

composer.lock

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ChildProcess/Adapter.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/ChildProcess/Directory.php

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/ChildProcess/File.php

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)