Skip to content

perf(goto): lazy load adblock assets#659

Merged
Kikobeats merged 1 commit intomasterfrom
codex/fix-adblock-lazy-load
Feb 26, 2026
Merged

perf(goto): lazy load adblock assets#659
Kikobeats merged 1 commit intomasterfrom
codex/fix-adblock-lazy-load

Conversation

@Kikobeats
Copy link
Member

@Kikobeats Kikobeats commented Feb 26, 2026

Note

Low Risk
Low risk: this is a localized refactor from eager sync file reads to cached async lazy-loading, with a focused unit test to prevent regressions. Main risk is timing/initialization differences if callers assume immediate availability of the adblock engine or autoconsent script.

Overview
Switches goto adblock initialization to lazy-load heavy assets (engine.bin and autoconsent.playwright.js) via cached promise helpers (getEngine, getAutoconsentPlaywrightScript) instead of readFileSync at module import.

Updates adblock/autoconsent setup to await/chain these loaders when enabling/disabling blocking and when injecting/running the autoconsent script, and adds a unit test that asserts requiring adblock.js performs zero targeted synchronous reads.

Written by Cursor Bugbot for commit c8c8bd0. This will update automatically on new commits. Configure here.

@Kikobeats Kikobeats merged commit 0b1ff2d into master Feb 26, 2026
11 checks passed
@Kikobeats Kikobeats deleted the codex/fix-adblock-lazy-load branch February 26, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant