Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance by only using FiberHandler for ReactiveHandler #237

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

clue
Copy link
Owner

@clue clue commented Aug 31, 2023

This changeset improves performance by only using FiberHandler for ReactiveHandler. In particular, the traditional PHP SAPIs and the new App::__invoke() method do not need to start a fiber for each request.

On my machine, the App::__invoke() is now ~40% faster consistently (16s -> 10s for 1M invocations) and the PHP development web server is ~10% faster (2000rps -> 2200rps). The performance of the built-in web server is unchanged as expected (14000rps).

Besides performance improvements, this also allows us to clean up a number of now unneeded checks in the test suite and simplify quite a few tests a bit.

Builds on top of #236, #224, #128, #117 and others

@clue clue added the new feature New feature or request label Aug 31, 2023
@clue clue requested a review from SimonFrings August 31, 2023 08:04
Copy link
Contributor

@SimonFrings SimonFrings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@SimonFrings SimonFrings merged commit 7f64e51 into clue:main Sep 1, 2023
51 checks passed
@SimonFrings SimonFrings deleted the reactive-fibers branch September 1, 2023 06:59
@SimonFrings SimonFrings added this to the v0.15.0 milestone Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants