4 ms·
Extensions should be given an aggressive memory limitation to work with, and a profiler should be made so that extension developers can see what they're using a
by buro9 15y ago
Extensions should be given an aggressive memory limitation to work with, and a profiler should be made so that extension developers can see what they're using and where it's spent.
Constraints are good things.
- ferongr 15y agoFor various reasons this cannot be done for most traditional extensions that introduce advanced functionality (e.g. AdBlock Plus), since they can override the browser's functionality without limitation. Add-on SDK extensions are another matter but those are comparatively very limited in what they can do.
- obtu 15y agoThis can be fixed with a split model. Chromium sometimes introduces fairly ad-hoc APIs (there was one to hook into HTTP requests, first declaratively which was discontinued, then with JS-side filtering which seems to be used by the ABP port); Jetpack add-ons can also use custom modules that hook into the full Firefox API. That way, the part that needs care and auditing for memory/lifetime issues can remain small. https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/reusable-modules.html https://addons.mozilla.org/en-US/developers/docs/sdk/latest/...
- nnethercote 15y agoEven if a per-extension memory limit was possible, good luck choosing the actual limit and then surviving the storm of "WTF did Firefox kill my extension?" complaints.