Is there anything like this for web-extensions?
And is there any way to measure an add-ons performance?
I found this article:
Which leads to this add-on, which is four years out-of date:
Do you guys have any experiences of what makes add-ons slower? (except dom-mutation listeners and mouse-motion listeners)
Info: My add-on uses content-scripts on every page, as it supports translating text using certain mouse-actions. Also, I haven’t noticed any performance issues, but some of my users said it slowed firefox down (not sure if it was fixed with the web-extension port though).
For example, I’m really interested if these hurt performance:
- I add multiple content-scripts to my page (some libraries are in separated into different files)
– Also, each of these js files has a license in the header
– Will firefox compile and cache them once or will they be parsed on every page-load?
– So could I improve performance by compiling my content-scripts into one compressed file with no comments?
- I always load all of these content-scripts when a page is loaded, as I have no idea how to load files delayed… would it help to wait for the mouse-action before I load the other js files?
- could it help to move functionality to the background-script (if possible) and use sendMessage instead?
This is the current state of my web-extension port:
Any hints on improving the performance of my add-on are very much appreciated.