-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Create a checksum of the config file in memory #34146
Create a checksum of the config file in memory #34146
Conversation
Signed-off-by: Mateus de Lima Oliveira <mateus@ativarsoft.com>
Check if config file exists before trying to read it. Signed-off-by: Mateus de Lima Oliveira <mateus@ativarsoft.com>
* config file data has been changed therefore all the other | ||
* code that depend on the the config file opcode will not | ||
* be recompiled. */ | ||
$data = var_export($this->cache, true); |
Check failure
Code scanning / Psalm
TaintedHtml
* config file data has been changed therefore all the other | ||
* code that depend on the the config file opcode will not | ||
* be recompiled. */ | ||
$data = var_export($this->cache, true); |
Check failure
Code scanning / Psalm
TaintedHtml
Changed comment style to make the linter like it. Signed-off-by: Mateus de Lima Oliveira <mateus@ativarsoft.com>
As reference: #34099 Thanks for creating a new version of your pull request 👍 Our usual workflow is that pull request target master as branch. Please don't forget to add the logging output (as requsted in the old pull request) to figure out what the actual issue is. The configuration file is only rewritten (and the opcache cleared) when a change is detected: Lines 158 to 164 in c2dafb0
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Target branch: master
The log is empty, Daniel. |
Hey, when you change the target branch you may need to rebase your pull request. Right now all commits from stable24 which are not in master are also referenced. |
@kesselb, I have no idea how to resolve those rebase conflicts. |
It depends a bit on your local setup. When people are working with a fork they usually add another remote "upstream".
Then run Afterwards rebase your local branch with the upstream changes GitHub documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks |
$data = var_export($this->cache, true); | ||
$currentChecksum = crc32($data); | ||
|
||
if ($this->getLastChecksum() == $currentChecksum) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will never be true, the checksum computed from file use the whole file content while the current one use only the data.
Any reason this PR is against stable24? Do we have a equivalent for master? |
Closing the pull request due to inactivity. |
This fixes a massive performance bug when opcache is enabled.
Signed-off-by: Mateus de Lima Oliveira mateus@ativarsoft.com