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

Explore using fopen() instead of is_file() and file_get_contents() for static analysis cache #825

Open
sebastianbergmann opened this issue Oct 10, 2020 · 1 comment

Comments

@sebastianbergmann
Copy link
Owner

@johannes mentioned:

Try opening it using fopen() or similar. If that fails the file isn't in cache and you can take that path. If it succeeds you can process the cache directly or keep the file handle around for a short while. In the case the file is in cache this becomes a single access (plus reads) instead of two and directly verifies all permissions etc.

@sebastianbergmann
Copy link
Owner Author

@Slamdunk What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant