Problem/Motivation
Yoast SEO includes an analytics library with a large file size. This library has a large footprint on PHP memory usage. When using JavaScript aggregation, this may cause PHP to run out of memory for sites running on a moderate memory limit such as 128MB. This is especially true for sites running on Drupal 10 with on-the-fly JavaScript minification enabled: https://www.drupal.org/node/3305725
Proposed resolution
Exclude the Yoast SEO analytics_core library from JavaScript preprocessing to reduce PHP memory footprint when using JavaScript aggregation
Remaining tasks
- Write a patch
- Review
- Commit
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3404287-2.patch | 465 bytes | idebr |
Comments
Comment #2
idebr commentedAttached patch excludes the Yoast SEO analytics_core library from JavaScript preprocessing to reduce PHP memory footprint
Comment #3
victonator commented#2 works!
We upped our PHP memory limit because of this.
The patch also made our backend loading times shorter.
Comment #4
c_archer commentedThe patch works and it would be good to get this reviewed and resolved.
Comment #5
c_archer commentedComment #7
kingdutchGood catch, that file should already be minified so it shouldn't be reprocessed.
Thanks for your contribution!