Open Bug 1295108 Opened 9 years ago Updated 2 years ago

Changes to HTML <base> element cause performance issues

Categories

(Core :: DOM: Core & HTML, defect, P3)

51 Branch
defect

Tracking

()

People

(Reporter: art.clarity, Unassigned)

Details

(Keywords: perf, testcase)

Attachments

(1 file)

Attached file testcase.html
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Steps to reproduce: 1. Generate an HTML page with 10k of <a> elements 2. Modify <base> element 1k times Actual results: Page takes 20+ seconds to load Expected results: Page should load in under 1 second
Keywords: testcase
Forgot to mention, in other browsers - page does take less than 1 second to load. This issue is unique to Firefox.
Product: Firefox → Core
Component: Untriaged → DOM
Keywords: perf
Priority: -- → P3
The reason why we are slow is because, when we change the baseURL, we remove the list of Link elements from nsIDocument and then we reinsert them all again. https://dxr.mozilla.org/mozilla-central/source/dom/base/nsDocument.cpp#8995
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: