Thien Hoang
unread,Jul 29, 2025, 12:00:25 PM7/29/25Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, Thien Hoang, Oliver Dunk, Chromium Extensions, woxxom
Apparently, moving content script from dynamic to static improved a lot. There was this function called "updateContentScript" found in DevTools Performance tab of service worker, which I assume is Chrome-internal because we don't have anything like that in our code; it kept running every time we did any operation in our extension. I supposed that if I switched to static content script, such calls wouldn't be necessary anymore, so I did, and it disappeared, messages got faster for single-tab test case.
However, if I load multiple tabs (6-7) at the same time, messages are still significantly delayed on both service worker and content script, service worker got slowed down significantly (promises take longer to resolve, read operations in IndexedDB became slower). When all tabs finish loading, the speed becomes normal again.
Simply put, I imagine that the MV3 service worker gets much less resource and priority (compared to MV2 background script), therefore all operations just take much more time. The effect gets worse when many tabs are loading. Although I can't find this issue documented anywhere, all testing results and feedback from our users showed a major slowdown after moving to MV3.
Can someone confirm my hypothesis above?