- Issue created by @alexpott
- Status changed to Needs workalmost 2 years ago 8:05am 16 January 2024
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊThis is not yet passing tests. Also: one question on the MR π€ 
- π¬π§United Kingdom longwave UKGiven that the primary use of FileCache appears to be YAML parsing, wonder if we should add a Yaml::parseCacheableFile()or similar method that wraps the parsing in FileCache and then callers don't need to care about implementing it themselves?
- Status changed to Needs reviewalmost 2 years ago 11:37am 16 January 2024
- π¬π§United Kingdom alexpott πͺπΊπI think we should add a CR just in case anyone is doing something like ThemeUiTest where they are re-writing .info.yml in under a second. 
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australiaalexpott β credited kim.pepper β . 
- π¬π§United Kingdom alexpott πͺπΊπThanks for the review @kim.pepper 
- π¬π§United Kingdom alexpott πͺπΊπI think #4 is follow-up material and I think collections are useful - as shown in the test in this issue where we're able to clear the info parser static cache and make it not use a cache backend. Also, I think this issue is responsible for a considerable speed up in tests. The webservers are only going to have read every extension info.yml once per job. And as we have APCu enabled in cli same for each CLI process. This is likely to the millions of function calls in each job. See how \Drupal\Core\DrupalKernel::boot()sets the prefix without a site path and we have theapcu_ensure_unique_prefixsetting set to FALSE.
- Status changed to RTBCalmost 2 years ago 9:46am 19 January 2024
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊAlso, I think this issue is responsible for a considerable speed up in tests. The webservers are only going to have read every extension info.yml once per job. And as we have APCu enabled in cli same for each CLI process. This is likely to the millions of function calls in each job. See how \Drupal\Core\DrupalKernel::boot()sets the prefix without a site path and we have theapcu_ensure_unique_prefixsetting set to FALSE.Holy π© π€©π€― You're right! π€― 
- Status changed to Needs workalmost 2 years ago 10:46am 19 January 2024
- π¬π§United Kingdom longwave UKAgree #4 can be explored elsewhere. Discussed in Slack with @alexpott and we think that instead of forcing a cache invalidation in the trait we can just force the mtime of the file to be one second newer than the previous mtime, which should trigger the cache to invalidate by itself. 
- π¬π§United Kingdom alexpott πͺπΊπDid #13 - it looks great - https://git.drupalcode.org/project/drupal/-/merge_requests/6181/diffs?co... 
- Status changed to Needs reviewalmost 2 years ago 10:54am 19 January 2024
- Status changed to RTBCalmost 2 years ago 11:29am 19 January 2024
- Status changed to Fixedalmost 2 years ago 11:43am 19 January 2024
- π¬π§United Kingdom catchYes this looks really good. Committed/pushed to 11.x, thanks! 
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊWow, elegant solution for a test-only scenario! π 
- Automatically closed - issue fixed for 2 weeks with no activity. 
- πΊπΈUnited States bkosborne New Jersey, USAI know there was some discussion if this needed a change record or not, and ultimately one was added. I just want to ask that any changes that affect APCu cache always do receive a change record. I help maintain a very large (> 500 sites) multisite install. Any increase to APCu cache utilization, however small, can have cause a big increase in my overall APCu utilization and cause major issues if all allocated memory is exhausted. I don't say this to indicate Drupal shouldn't utilize APCu cache for new things, just that the core committers please ensure that the changes are advertised as change records, just like this one was. It allows me time to test how much more memory I'll need to allocate. Thank you