Closed
Bug 1322684
Opened 9 years ago
Closed 2 years ago
DOM traversal 5X slower than bookmarklet or Chrome extension
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WONTFIX
| Performance Impact | ? |
People
(Reporter: tinebak, Unassigned)
Details
Attachments
(1 file)
|
1.62 KB,
application/javascript
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36
Steps to reproduce:
I created a simple script (attached) that traverses the DOM of a webpage and looks up the computed styles of the elements.
I ran this script in three ways:
1) Firefox bookmarklet
2) Chrome extension
3) Firefox extension
The Firefox extension loads and executes the script when the user click the browser button.
Firefox background page:
browser.browserAction.onClicked.addListener(function(tab) {
browser.tabs.executeScript(null, {file:"tryrun.js"});
});
I measured the time to execute the traversal, which does not include time to load the extension/bookmarklet, etc.
Actual results:
The Firefox extension is really slow compared to the other methods. I ran it on the following basic webpage: http://www.bbcgoodfood.com/recipes/3256/moroccan-lamb-with-apricots-almonds-and-mint
Times:
Chrome extension: 250 ms
Firefox extension: 1550 ms
Firefox bookmarklet: 400 ms
Expected results:
It should have been faster. Unfortunately this means that I cannot create my tool as a Firefox extension. Once I include the extension's other code the extension can take more than 5 seconds to execute. This is not acceptable to my users.
Updated•2 years ago
|
Severity: normal → --
Component: Extension → DOM: Core & HTML
Product: Web Apps → Core
Updated•2 years ago
|
Performance Impact: --- → ?
Comment 1•2 years ago
|
||
This bug is quite old and most parts involved here have been changed since the original report. If we have real world cases of this happening we should make sure a new bug is filed containing them.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•