Skip to content

Commit b5870f1

Browse files
committed
Improve comments / docs
1 parent f793563 commit b5870f1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Optimizes infinite scroll performance by managing DOM nodes and visibility for a
1313

1414
The Article Sequence Optimizer improves the performance of long article sequences (infinite scroll) by intelligently managing the DOM. It uses a hybrid approach to reduce Interaction to Next Paint (INP) and memory usage:
1515

16-
1. **CSS Content Visibility**: For articles containing iframes (like embeds), it uses `content-visibility: hidden` to prevent heavy reloads and flickering when scrolling back.
17-
2. **DOM Detachment**: For text/image-only articles, it detaches the content from the DOM and stores it in a memory fragment, significantly reducing the DOM size and style recalculation costs.
16+
1. **CSS Content Visibility**: For articles containing iframes (like embeds), it uses `content-visibility: auto` to remove them from the video memory / rendering chain, while preventing reloads or flickering when scrolling back.
17+
2. **DOM Detachment**: For text/image-only articles, it detaches the content from the DOM and stores it in a memory fragment, significantly reducing the active DOM size and style recalculation costs.
1818

1919
## Configuration
2020

assets/js/article-sequence-optimizer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
}
6767

6868
if ( hasEmbeds( el ) ) {
69-
// STRATEGY A: IFRAME ( CSS Hide ) - Secure against emmbeds re-initialization
69+
// STRATEGY A: IFRAME ( CSS allow content-visibility optimization ) - Secure against embeds re-initialization
7070
el.classList.add( 'inp-article-visibility-optimized' );
7171
} else {
7272
// STRATEGY B: DETACHMENT ( Memory Move ) - Secure against XSS

0 commit comments

Comments
 (0)