-
Couldn't load subscription status.
- Fork 2.2k
Description
I've been meaning to open an issue for this for a while now, but never got around to it.
The recommendation to set opcache.enable_cli=1 is actually bad for performance. I am not sure who came up with this, but I reckon that whoever it was did not understand what it meant.
Enabling OPcache for CLI has the following effect: it will optimize the CLI script (which takes of course more time the first time to do). However, in the case of a CLI script, it is always the first time for every single invocation of the script. The cache only lives until the process terminates, so as soon as the script ends the optimizations are gone.
The only effect it had was that the script took longer to run, because optimization were done during runtime.
You do not have to take my word for it. You can read up on this topic in several articles or contact the PHP developers.
(Full disclosure: There are certain exceptions where perf can be improved for CLI scripts, but please note that those do not come into play for occ or any CLI script that is run by nextcloud.)
Not only the documentation is wrong here, also the check in settings -> admin -> overview. It is rather annoying to get a warning every time, even though the settings are actually better for performance.
But I guess that's a separate ticket, which I will happily open as soon as we have established that my concerns are well-founded.