Open Bug 469256 Opened 16 years ago Updated 2 years ago

Measure the impact of view source linkification on view source performance.

Categories

(Core :: DOM: HTML Parser, defect)

defect

Tracking

()

mozilla1.9.1b3

People

(Reporter: cbartley, Unassigned)

References

Details

Attachments

(2 files)

View source linkification could have had an adverse impact on view source performance, but since we haven't measured it yet, we just don't know. bz says (in a comment on bug 17612): >>> It doesn't even have to be automated as a first cut. Just knowing how much of an impact (if any) this has on view-source performance would be good. There are old view-source performance bugs that should be able to provide nice pathological testcases if those are desired.
Status: NEW → ASSIGNED
Assignee: nobody → cbartley
Alternately you could just produce an HTML file something like: <body> <a href="http://example.com/1"></a> <a href="http://example.com/2"></a> ...repeat with another 10000 lines or so, incrementing the number... </body> and then time the pageload for view-source with and without linkification. That should pretty much give you an upper bound on the overhead, I think.
Hacked viewSource.js for measuring view-source load and display time, for reference only. The clock starts ticking before the load from cache or URL, and ends with the "load" event with the view-source content displayed. The number of elements in the document is also displayed (the number of *nodes* might be useful, but is harder to measure).
This file is a simple linkification benchmark testcase. It's a simple HTML file with 10K anchor elements in it. Most real files will not have hyperlink density as extreme as this file, so it should be useful for determining an upper bound on how expensive linkification is.
Here are the results of two test runs using the viewSource.js modifications in attachment 353259 [details] [diff] [review] and the test file in attachment 353261 [details]. I used essentially the same build (~ revision 22788:2c2d64b8566c). The first test run had nsViewSourceHTML.{h,cpp} reverted to just before the linkification change, and the second test run is essentially the current code with linkification. without linkification --------------------- 7.504s 7.214s 7.521s 7.862s 7.658s 41681 elements with linkification ------------------ 10.947s 10.837s 10.410s 10.921s 10.409s 61681 elements I suspect that most of the performance differential is due simply to the substantially larger DOM in the linkification case, but I haven't confirmed that.

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: cab → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: