Closed Bug 521764 Opened 15 years ago Closed 14 years ago

[HTML5] Warn to error console when speculation fails

Categories

(Core :: DOM: HTML Parser, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: hsivonen, Assigned: hsivonen)

References

Details

Attachments

(1 file)

When a speculation fails, emit a warning to error console (preferably with a link to an explanatory DevMo article) so that site authors can avoid speculation failures.
Attached patch Warn to console (deleted) — Splinter Review
I sent a deliberately broken parser that always failed speculations to the tryserver. On Mac, it was only 1% worse on tp4, but on Linux it was 13% worse on tp4 (both 32-bit and 64-bit).

While it's unlikely that a real site would have many scripts and fail speculation on every one, this result suggests that speculation failures may lead to measurable badness.

Note that the message is inaccurate until bug 535530 is fixed.
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Attachment #452709 - Flags: review?(jonas)
Windows falls between Mac and Linux (4% Windows 7, 8% XP)
This is a totally new type of warning that we've never done before. I.e. we're not warning about brokenness at all, but rather just warning about something that can possibly result in a performance hit.

I'm fine with putting this warning in, though I think we need to keep an eye out and if it's confusing people we need to remove it.
One alternative could be to make this be a global notification that Firebug etc can then stick in a console or what not rather than putting this in the JS console.
Thanks. Landed: http://hg.mozilla.org/mozilla-central/rev/81ff228d9bd0

(In reply to comment #4)
> One alternative could be to make this be a global notification that Firebug etc
> can then stick in a console or what not rather than putting this in the JS
> console.

Filed bug 575538 about this.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Depends on: 997489
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: