Skip to content

Revert "LoAF: support approximate source locations for promise resolvers"#41596

Merged
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-4803709
Aug 23, 2023
Merged

Revert "LoAF: support approximate source locations for promise resolvers"#41596
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-4803709

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Aug 23, 2023

This reverts commit 07a41b1a0d49acd929ba716332c65ec7c8c55a2b.

Reason for revert: performance regression.
See https://bugs.chromium.org/p/chromium/issues/detail?id=1475117

Will try to refactor and run pinpoint on the CL with that test.

Original change's description:

LoAF: support approximate source locations for promise resolvers

Attribute the source location of a promise resolver that contributed
to LoAF to the script that created it, e.g. the script that called
fetch().

Getting the exact source location of the promise resolver itself
would require capturing a stack trace, which might be too much
overhead, so this is the next best thing. We can revise in the future
whether a shallow stack trace is something we're OK with in some
circumstances.

Note that it's impossible to get the location of the actual then(),
as that's a microtask that's batched together with all the rest of
the microtasks (e.g. other then()s of the same promise).

The animation frame monitor maintains a weak map between the promise
resolver and the source location of the event
listener/script-block/callback that was responsible for creating it.
This source location is then used when a promise is resolved and the
resolution task is a long script that contributes to the LoAF.

Bug: 1392685
Change-Id: I268ebbbf035b0800a5d1bd61cd939e46533fe064
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4783320
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1186486}

Bug: 1392685
Change-Id: I11a4618e5e9be83c116547d63483bae4c8954d13
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4803709
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1187097}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Chromium project.

…ers"

This reverts commit 07a41b1a0d49acd929ba716332c65ec7c8c55a2b.

Reason for revert: performance regression.
See https://bugs.chromium.org/p/chromium/issues/detail?id=1475117

Will try to refactor and run pinpoint on the CL with that test.

Original change's description:
> LoAF: support approximate source locations for promise resolvers
>
> Attribute the source location of a promise resolver that contributed
> to LoAF to the script that created it, e.g. the script that called
> fetch().
>
> Getting the exact source location of the promise resolver itself
> would require capturing a stack trace, which might be too much
> overhead, so this is the next best thing. We can revise in the future
> whether a shallow stack trace is something we're OK with in some
> circumstances.
>
> Note that it's impossible to get the location of the actual then(),
> as that's a microtask that's batched together with all the rest of
> the microtasks (e.g. other then()s of the same promise).
>
> The animation frame monitor maintains a weak map between the promise
> resolver and the source location of the event
> listener/script-block/callback that was responsible for creating it.
> This source location is then used when a promise is resolved and the
> resolution task is a long script that contributes to the LoAF.
>
> Bug: 1392685
> Change-Id: I268ebbbf035b0800a5d1bd61cd939e46533fe064
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4783320
> Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
> Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1186486}

Bug: 1392685
Change-Id: I11a4618e5e9be83c116547d63483bae4c8954d13
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4803709
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1187097}
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 02bfa1b into master Aug 23, 2023
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-4803709 branch August 23, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants