I’m building a personal Chrome MV3 extension. Chrome and my PC run normally when the extension is disabled, but as soon as I load the unpacked extension, Chrome starts feeling laggy/heavy.
I’m not asking anyone to debug private production code. I’ve redacted the real domains and replaced them with fake hosts.
Setup:
What I’m trying to find:
Minimal redacted manifest shape:
{ "manifest_version": 3, "name": "Redacted Extension", "version": "1.0", "permissions": ["storage", "scripting", "tabs", "alarms", "webNavigation"], "host_permissions": [ "https://app1.example.com/*", "https://app2.example.com/*" ], "background": { "service_worker": "service_worker.js", "type": "module" }, "content_scripts": [ { "matches": ["https://app1.example.com/*"], "js": ["content-a.js"], "all_frames": true, "run_at": "document_end" }, { "matches": ["https://app2.example.com/*"], "js": ["content-b.js"], "all_frames": true, "run_at": "document_end" } ] }Example pattern I’m worried about:
const observer = new MutationObserver(() => { clearTimeout(debounceTimer); debounceTimer = setTimeout(scanPage, 250); }); observer.observe(document.body, { childList: true, subtree: true }); setInterval(scanPage, 5000); function scanPage() { const nodes = document.querySelectorAll("div, span, button, input"); for (const node of nodes) { // reads text/attributes and updates extension state } }What should I check first? Should I profile through Chrome Task Manager, DevTools Performance, chrome://extensions service worker inspection, or another tool?
Github link for the repo is: https://github.com/jacobsscoots/CTL-Redacted