wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

3.17: Changing LRC threshold isnot working

Open Mai-Saad opened this issue 1 year ago • 1 comments

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version => feature/lrc fb50ef3b9db98b09b4b90797f5c16117a1560435
  • Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug When changing LRC threshold, we aren't optimizing elements within the new threshold

To Reproduce Steps to reproduce the behavior:

  1. Having a page with eligible elements i.e https://new.rocketlabsqa.ovh/lrc_normal-_wp_page or https://new.rocketlabsqa.ovh/lrc_similive1
  2. Clear performance hints
  3. Visit the page
  4. Clear cache and revisit the page => notice the elements having data-wpr-lazyrender="1"
  5. Decrease LRC threshold so that other elements are in that threshold and below the fold
  6. Repeat steps 2-4 => same elements as in 4 and elements in new threshold aren't optimized

Expected behavior Optimization applied as per set LRC Threshold

Acceptance Criteria (for WP Media team use only)

  • Elements above the fold and in modified threshold i.e 800 => if all the element is ATF then not LR , if it has some children below the fold then children are LR
  • Elements below the fold and in modified threshold i.e 800 => if the whole element is below the fold and in threshold then only parent is LR The default threshold is 1800
  • If elements are in the threshold and below the fold but the screen size is not acceptable then bailout (nothing added to DB)

Mai-Saad avatar Aug 27 '24 06:08 Mai-Saad

Might be related to https://github.com/wp-media/rocket-scripts/issues/25 I would suggest to re-test once it is available.

MathieuLamiot avatar Aug 27 '24 20:08 MathieuLamiot

Working fine here https://github.com/wp-media/wp-rocket/pull/6929

Elements above the fold and in modified threshold i.e 800 => if all the element is ATF then not LR

this case will be LR and under discussion with PO https://wp-media.slack.com/archives/CUKB44GNN/p1725010121559999?thread_ts=1725009496.716359&cid=CUKB44GNN

Mai-Saad avatar Aug 30 '24 09:08 Mai-Saad