68916[TASK] Don't concatenate ext_localconf / ext_tables to cache
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 6
- typo3/sysext/core/Classes/Core/BootService.php+2 −2
- typo3/sysext/core/Classes/Core/Bootstrap.php+5 −11
- typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php+2 −146
- typo3/sysext/core/Tests/Unit/Utility/AccessibleProxies/ExtensionManagementUtilityAccessibleProxy.php+0 −31
- typo3/sysext/core/Tests/Unit/Utility/ExtensionManagementUtilityTest.php+2 −252
- typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php+2 −2
Review log 711
-
Christian Kuhn uploaded patch set 1 04/29/21, 16:03
-
core-ci voted on patch set 1 V -1 04/29/21, 16:05 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10918
-
Christian Kuhn uploaded patch set 2 04/29/21, 16:14
-
core-ci voted on patch set 2 V +1 04/29/21, 16:25 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10920
-
Christian Kuhn updated the commit message in patch set 3 04/29/21, 17:10
-
Christian Kuhn updated the commit message in patch set 4 04/29/21, 17:11
-
core-ci voted on patch set 4 V +1 04/29/21, 17:22 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10924
-
core-ci voted on patch set 3 V +1 04/29/21, 17:22 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10923
-
Benjamin Franzke commented on patch set 4 CR -2 04/29/21, 17:30
Note that ext_* files are loaded *conditionally* (if (file_exists(…)) that means they are not only covered by opcache, but also require a stat(2) cache. Now, please read https://www.php.net/manual/en/function.clearstatcache.php > You should also note that PHP doesn't cache information about non-existent files. So, if you call file_exists() on a file that doesn't exist, it will return false until you create the file. If you create the file, it will return true even if you then delete the file. However unlink() clears the cache automatically. Given that less and less extensions use ext_tables.php and localconf (thanks to DI), this means for many extension *no cache* will be used to consider whether the file exists or not. That means real disk IO, for *every* request. Now, so this is not a opcache vs no-opcache decision, but SSD vs HDD. And then it becomes clear: There are still *many* servers with HDDs, therefore I'm against this change.Unresolved
Do you have numbers? I mean there where hosters (m*…*d) that sold this as an extra feature (not sure whether that's still the case).Unresolved
Let's avoid bold statements like this.Unresolved
Do you have some reference for this statement? Does opcache really cache every single file, forever? I pretty sure this is incorrect, as it would lead to major cache leaks. -
Christian Kuhn abandoned the change 04/29/21, 17:33
-
Benjamin Franzke commented on patch set 4 04/29/21, 17:48
Unresolved
While this is a small improvement regardingr DX, ext_localconf/tables still is a mess because it relies on global state, makeInstance and stuff and still isn't fun to work with. We've made good progress of reducing ext_localconf/tables usage, so I don't think it's worth for developers to *refactor* the ext_localconf/tables file, it would be much better to be able to move stuff into Configuration/, eg. into Service.yml/php.