Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Performance APIs #1934

Merged
merged 7 commits into from
Oct 22, 2024
Merged

Add Performance APIs #1934

merged 7 commits into from
Oct 22, 2024

Conversation

Elchi3
Copy link
Collaborator

@Elchi3 Elchi3 commented Oct 9, 2024

Web features for the Performance APIs, see https://developer.mozilla.org/en-US/docs/Web/API/Performance_API

Adds a new "Performance" group consisting of these features:

  • Performance (main feature, uses compute_from)
  • Back/forward cache blocking reasons
  • Element timing
  • Event timing
  • Largest contentful paint (LCP)
  • Layout instability
  • Long tasks
  • Memory measurement
  • Navigation timing
  • Page visibility state
  • Paint timing
  • Resource timing (initial support)
  • Resource size
  • Server timing

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Oct 9, 2024
@Elchi3 Elchi3 marked this pull request as ready for review October 9, 2024 13:25
Copy link
Collaborator

@autonome autonome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass review, but it's a big PR, so should get another review as well.

  • 👍🏼 on the group rename
  • 👍🏼 on removing performance from the feature names
  • 👍🏼 on overall feature breakdown/composition
  • The descriptions seemed generally fine but IIRC we've tended away from using interface and instead making active descriptions of the implementation, should get a 2nd opinion here

features/page-visibility.yml Outdated Show resolved Hide resolved
features/page-visibility.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bunch of ideas for you!

features/performance.yml Outdated Show resolved Hide resolved
features/paint-timing.yml Outdated Show resolved Hide resolved
features/performance.yml Show resolved Hide resolved
features/page-visibility-state.yml Outdated Show resolved Hide resolved
features/navigation-timing.yml Outdated Show resolved Hide resolved
features/largest-contentful-paint.yml Outdated Show resolved Hide resolved
features/event-timing.yml Outdated Show resolved Hide resolved
spec: https://wicg.github.io/element-timing/
group: performance
compat_features:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should probably be something like html.global_attributes.elementtiming in here, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, there isn't such a key in BCD. The docs have no compat table either. https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/elementtiming. Not sure if it is "global" either:

This attribute may be applied to <img>, <image> elements inside an <svg>, poster images of <video> elements, elements which have a background-image, and elements containing text nodes, such as a <p>.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out there's no actual specification for this (though its reflection is via Element). I filed mdn/browser-compat-data#24788

features/element-timing.yml Outdated Show resolved Hide resolved
features/bfcache-blocking-reasons.yml Outdated Show resolved Hide resolved
Elchi3 and others added 2 commits October 21, 2024 16:52
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ready, apart from some messes I made.

I caused the conflicts by merging a change to the specs drafts script. Merging main, running update-drafts on the affected specs, and refreshing the dist should fix it up nicely.

I also suggested some fixes to typos that I introduced.

features/element-timing.yml Outdated Show resolved Hide resolved
features/longtasks.yml Outdated Show resolved Hide resolved
@Elchi3
Copy link
Collaborator Author

Elchi3 commented Oct 22, 2024

Thanks Daniel, I think I also caused a bit of a mess by manually updating drafts plus the latest BCD release actually contained new Performance API keys plus the new draft collection now also contains sub features without a spec_url.

In theory it should be all fixed now and we can be sure that all keys have been mapped!

spec: https://wicg.github.io/element-timing/
group: performance
compat_features:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out there's no actual specification for this (though its reflection is via Element). I filed mdn/browser-compat-data#24788

@ddbeck ddbeck merged commit 8edfd36 into web-platform-dx:main Oct 22, 2024
3 checks passed
@Elchi3 Elchi3 deleted the performance-apis branch October 22, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants