[HTML5] Warn to error console when speculation fails

RESOLVED FIXED

Status

()

Core
HTML: Parser
P3
enhancement
RESOLVED FIXED
8 years ago
4 years ago

People

(Reporter: hsivonen, Assigned: hsivonen)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.
Priority: -- → P2
Priority: P2 → P3
Created attachment 452709 [details] [diff] [review]
Warn to console

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.
Attachment #452709 - Flags: review?(jonas) → review+
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
Last Resolved: 8 years ago
Resolution: --- → FIXED

Updated

4 years ago
Depends on: 997489
You need to log in before you can comment on or make changes to this bug.