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

perf: cache document root resolution when possible #1002

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

dunglas
Copy link
Owner

@dunglas dunglas commented Aug 25, 2024

In #1001, @AlliBalliBaba noticed a performance hit due to symlink resolution.

In most cases, it's possible to totally avoid this, as well as other operations that are done for each incoming request. It's what this patch does.

@dunglas
Copy link
Owner Author

dunglas commented Aug 26, 2024

According to our benchmarks (https://github.com/dunglas/frankenphp/blob/main/testdata/load-test.js with https://github.com/dunglas/frankenphp/blob/main/testdata/benchmark.Caddyfile), this patch improves the average response time by 5.17%!

@dunglas dunglas merged commit db12b4e into main Aug 26, 2024
46 checks passed
@dunglas dunglas deleted the perf/resolve-root branch August 26, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant