When installing a webextension, does the mere existence of a background.js file negatively impact performance* at all, considering that it is a separate javascript file that must be loaded?
For most practical cases one could assume the answer is "pretty much No," but in the case of an older computer with less processing power, and a browser that could have dozens to hundreds of extensions, is it possible the cumulative strain of loading all those scripts in the background could produce a sizable impact, even if the contents of the scripts are not particularly resource-heavy?
From a CS standpoint does the very act of loading the javascript file impact performance, or is it only when code inside the file is executed that system resources are used?
In other words, to choose the most lightweight webextension possible, should one avoid background.js files, or does it not matter at all?
*in terms of CPU usage, RAM usage, browser startup time, or page load time
The answer to this question can be yes, no, and maybe, depending on what specifically those extensions do in their background scripts, and what the user does. Some negatives are always present though.
When the browser starts:
When the browser already runs: