Skip to content

Commit b8b79de

Browse files
Clarify comment about URL metric groups not changing across a single page load.
Co-authored-by: Weston Ruter <[email protected]>
1 parent e77bd53 commit b8b79de

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugins/image-prioritizer/class-image-prioritizer-background-image-styled-tag-visitor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ private function get_common_lcp_element_external_background_image( OD_URL_Metric
141141
*/
142142
private function maybe_preload_external_lcp_background_image( OD_Tag_Visitor_Context $context ): void {
143143
// Gather the tuples of URL Metric group and the common LCP element external background image.
144+
// Note the groups of URL Metrics do not change across invocations, we just need to compute this once for all.
144145
if ( ! is_array( $this->group_common_lcp_element_external_background_images ) ) {
145146
$this->group_common_lcp_element_external_background_images = array();
146147
foreach ( $context->url_metric_group_collection as $group ) {

0 commit comments

Comments
 (0)