Skip to content

LoAF: firstUIEventTimestamp contains non-INP events #1

Open

Description

@tunetheweb

firstUIEventTimestamp measures the first user interface event, which may include events that are not considered as “interactions” for the more restrictive Interaction Track of DevTools Perormance panel and INP as these only look at certain events with an interactionId. For example,pointerover, pointerdown, mousedown… etc. could all register as the firstUIEventTimestamp but would not count towards Interactions track/INP which might happen later in the frame (or not at all!).

While I think it’s right to measure these in LoAF , it could be confusing to developers if they are using firstUIEventTimestamp to measure LoAFs with interactions.

Should we add a firstInteractionEventTimestamp?

At the very least we should document this.

Reference: https://x.com/blue2blond/status/1751192272572420563?s=46&t=72NqVYI80BM0T97DHBG8iQ

Activity

  1. changed the title [-]LOAF: `firstUIEventTimestamp` contains non-INP events[/-] [+]LoAF: `firstUIEventTimestamp` contains non-INP events[/+] on Jan 27, 2024
  2. anatdagan commented on Jan 27, 2024

    @anatdagan
  3. tunetheweb commented on Jan 29, 2024

    @tunetheweb
    MemberAuthor

    @anatdagan could you please explain a little more about how this impacts you? You cannot use firstUIEventTimestamp to calculate RUM INP, and even if you could it wouldn't necessarily reflect the correct INP since firstUIEventTimestamp may not be related to the INP event.

  4. vanderhoop commented on Jan 29, 2024

    @vanderhoop

    Should we add a firstInteractionEventTimestamp?

    @tunetheweb If this were added (and the what-constitutes-an-interaction logic was consistent between loafs and inp attribution), would mapping a long animation frame to an INP attribution be as simple as loaf.firstInteractionEventTimestamp === inpAttribution.eventTime? Or would there be additional considerations?

    It'd be helpful regardless, as I had to poke around quite a bit to find the issues with firstUIEventTimestamp and why it wasn't used in Noam's linking gist.

  5. tunetheweb commented on Jan 29, 2024

    @tunetheweb
    MemberAuthor

    You could in theory have two interactions within the same frame, and the INP could be the second one so might not be the firstInteractionEventTimestamp. Or two interactions that start on the same timestamp.

    Though struggling to see how, as presumably the render delay part of INP wouldn't be until the end of the frame so the first one should be the longest... 🤔

  6. anatdagan commented on Jan 29, 2024

    @anatdagan
  7. mmocny commented on Jan 30, 2024

    @mmocny
    Contributor

    As one thing to consider-- LoAF is used for more than just INP measurement. Some folks have been using it for Smoothness and a type of "FPS" measure.

    In those cases, firstUIEventTimestamp might represent the e.g. pointermove/scroll events.

    I cannot say if the current value is useful or not, but if the issue is INP overlap I think there is a wider discussion about how best to do EventTiming <-> LoAF attribution and we can delay this decision until we gain more experience on this type of attribution work?

  8. transferred this issue fromw3c/longtaskson Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions