Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Traversing the 230+ git checkouts in my module folder roughly takes 50 seconds and was being run on nearly every admin page load. Therefor i implemented some caching and of course the performance gain is massive. Check it out!
Note: the diff is huge because of indention changes, try git diff --minimal --patience --color-words
after applying to filter that some.
Cache validity is hard-coded to 6hours.
Comment | File | Size | Author |
---|---|---|---|
git_deploy-add-caching.patch | 6.95 KB | eMPee584 |
Comments
Comment #1
blueyed CreditAttribution: blueyed commentedfilemtime(".git/")
for/with the cache key, so that it invalidates itself automatically - fstat'ing should be rather cheap. This could be an entry in the module's cache entry.Comment #2
Freso CreditAttribution: Freso commentedDoes #1511112: git_deploy slows down module install/enable massively solve your issue?
Comment #3
Darren Oh