Repository navigation
Conversation
|
Just realised that this doesn't apply to dirty composer autoloader paths with |
henderkes
left a comment
There was a problem hiding this comment.
The only thing I'm not entirely sure is whether we couldn't switch to using fstatat and siblings instead of doing the manual string operations for every path operation that doesn't need the resolved string.
Most importantly, ZTS (/a/c) differs from what NTS is doing (/x/c) when it could be using direct syscalls, get NTS' performance and also resolve (correctly) even for relative paths.
This would be worth exploring indeed. |
|
It's a bit of a larger rework that I wouldn't get ready in time for 8.6 anymore. It would remove a lot of the existing handling separately. |
arnaud-lb
left a comment
There was a problem hiding this comment.
This looks good to me!
Unfortunately we missed the 8.6 window. Do you want to merge this as-is, or do you want to try openat() first?
|
I think we may leave this to be a part of one of the greater reworks*. The work of this branch isn't really useful anymore when we call per-thread libc functions. Let's leave it open for now, I have FrankenPHP updating to 8.6 and upstreaming extension fixes for 8.6 left to do, then I come back to this. |
|
@arnaud-lb sorry to change course here, but let's actually get this merged first. I'm having some trouble with the full rework because I, how else could it be, underestimated the issues that old OS'es could have with per-thread cwd handling. OpenBSD for example needs read permissions on the threads base directory, which may still be acceptable, but then also runs into other problems down the line navigating further. Linux, Windows, macOS and FreeBSD work well. |
Absolute paths don't need to go through the per-thread cwd emulation, add a fast-path to directly hand them to libc.
since relative paths won't start with a leading slash, this adds negligible cost for them
Benchmark for Symfony demo:
cc @dunglas because this will be a nice improvement for frankenphp (though fpm alike) in 8.6 :)