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.
Add caching and streamline code to improve performance of skinr core module.
Comment | File | Size | Author |
---|---|---|---|
#6 | skinr-performance-2007416-6.patch | 5.23 KB | moonray |
#4 | skinr-performance-2007416-4.patch | 5.25 KB | moonray |
#1 | skinr-performance-2007416-1.patch | 3.1 KB | moonray |
Comments
Comment #1
moonray CreditAttribution: moonray commentedAttached patch improves performance on all but the first page load to the same load speed as not having any skins configurations on a page.
Some testing results on 500 page requests:
The results seem to indicate the following:
I'd like to test this with a high number of skin configs to see if more skins means incrementally slower load times (which I suspect), and if the patch indeed reduces those increased load times across the board.
Some additional eyes on this patch would be appreciated.
Comment #3
moonray CreditAttribution: moonray commentedThis patch is incompatible with skinr_context, which is why it failed. Needs work.
Comment #4
moonray CreditAttribution: moonray commentedWith 1000 skins, this patch offers the following performance enhancements:
Pre-path:
616ms +/- 6.8ms
Post-patch:
371ms +/- 7.7ms
That's a significant increase. The more skins are displayed on the page, the better the enhancements this patch adds.
A BIG caveat, if skinr_context module is enabled (or any module implementing
skinr_preprocess_alter()
), this patch's caches are skipped.Comment #6
moonray CreditAttribution: moonray commentedRemoved stray dpm(). Retesting.
Comment #8
moonray CreditAttribution: moonray commentedLeaving this open for follow-up patches. This can always be tweaked further.