Intent to Experiment: Explicit Compile Hints with Magic Comments

491 views
Skip to first unread message

Marja Hölttä

unread,
Apr 18, 2023, 8:03:24 AM4/18/23
to blin...@chromium.org, Leszek Swirski

Contact emails

ma...@chromium.org, les...@chromium.org


Explainer

None


Specification

None


Summary


Allow attaching information about which functions should be eager parsed & compiled in JavaScript files. The information will be encoded as magic comments.


We'll be experimenting with different magic comment formats, e.g., marking all functions in a file for eager compilation, or marking only a subset of functions.


For more information, see this doc.



Blink component

Blink>JavaScript


TAG review

None


TAG review status

Pending


Risks



Interoperability and Compatibility

No interoperability / compatibility risks. Other browsers are likely to ignore the hints if they perceive they cannot benefit from them. Ignoring the hint is allowed behavior. We plan to make the hints generic though, so that other browsers can later start to support them too.



Gecko: N/A; we've requested the position at https://github.com/mozilla/standards-positions/issues/780 . Note that there's no interop risk.



WebKit: N/A; we've requested the position at https://github.com/WebKit/standards-positions/issues/172 . Note that there's no interop risk.


Web developers: Positive signals from partners who want to use compile hints to eager-compile core JS files


Other signals:


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Goals for experimentation

We’re aiming to OT those hints to get a better understanding about

  1. The overall performance wins possible

  2. DevX and tool support needed to support adding compile hints magic




Ongoing technical constraints

None



Debuggability

None



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes


Is this feature fully tested by web-platform-tests?

No


The feature doesn't trigger any functional changes and cannot be tested by WPT.


Flag name

--js-flags=--compile-hints-magic

or --enable-features=CompileHintsMagic


Requires code in //chrome?

False


Estimated milestones

OriginTrial desktop last

117

OriginTrial desktop first

114




Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5100466238652416


This intent message was generated by Chrome Platform Status.



--


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Liana Sebastian.

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.

Yoav Weiss

unread,
Apr 19, 2023, 3:43:27 AM4/19/23
to Marja Hölttä, blin...@chromium.org, Leszek Swirski
LGTM to experiment M114-M117 inclusive.
Thanks for filing positions on this. While this doesn't pose any immediate interop risks, if other vendors can benefit from such magic comments, it'd be significantly better for web developers that we'd all converge on the same magic :)


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAED6dUDFRVTkCYDBkw-ZTSUr-0dyNfkGvuGgzwom1fW248axGg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages