Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Issue 2396763002: [promises] dont create resolving closures in PromiseThen (Closed)

Created:
4 years, 2 months ago by gsathya
Modified:
4 years, 2 months ago
Reviewers:
adamk
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[promises] dont create resolving closures in PromiseThen When we create native promises as part of PromiseThen, we don't have to create resolving closures. The closure will only ever be called once from PromiseHandle, therefore we don't need the alreadyResolved check. This results in a 21.76% improvement in the bluebird benchmark over 5 runs. BUG=v8:5046 Committed: https://crrev.com/4dc97f4a83fc2bb4193d6cc1779dd0763e0d5f4e Cr-Commit-Position: refs/heads/master@{#40018}

Patch Set 1 #

Patch Set 2 : modify NewPromiseCapability #

Patch Set 3 : add comment back #

Total comments: 1

Patch Set 4 : revert stuff #

Patch Set 5 : fix broken revert #

Total comments: 10

Patch Set 6 : address review comments #

Total comments: 1

Patch Set 7 : Add todo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -5 lines) Patch
M src/js/promise.js View 1 2 3 4 5 6 2 chunks +31 lines, -5 lines 0 comments Download

Messages

Total messages: 33 (21 generated)
gsathya
4 years, 2 months ago (2016-10-05 04:06:03 UTC) #8
adamk
This looks awesome. As discussed offline, it seems like NewPromiseCapability should just have its fast ...
4 years, 2 months ago (2016-10-05 18:18:34 UTC) #13
gsathya
On 2016/10/05 18:18:34, adamk wrote: > This looks awesome. As discussed offline, it seems like ...
4 years, 2 months ago (2016-10-05 20:11:18 UTC) #17
adamk
https://codereview.chromium.org/2396763002/diff/40001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2396763002/diff/40001/src/js/promise.js#newcode570 src/js/promise.js:570: var callbacks = CreateResolvingFunctions(deferred.promise, false); Ah, I didn't realize ...
4 years, 2 months ago (2016-10-05 20:18:09 UTC) #18
gsathya
On 2016/10/05 20:18:09, adamk wrote: > https://codereview.chromium.org/2396763002/diff/40001/src/js/promise.js > File src/js/promise.js (right): > > https://codereview.chromium.org/2396763002/diff/40001/src/js/promise.js#newcode570 > ...
4 years, 2 months ago (2016-10-05 22:01:27 UTC) #20
gsathya
On 2016/10/05 20:18:09, adamk wrote: > https://codereview.chromium.org/2396763002/diff/40001/src/js/promise.js > File src/js/promise.js (right): > > https://codereview.chromium.org/2396763002/diff/40001/src/js/promise.js#newcode570 > ...
4 years, 2 months ago (2016-10-05 22:01:28 UTC) #21
adamk
https://codereview.chromium.org/2396763002/diff/80001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2396763002/diff/80001/src/js/promise.js#newcode172 src/js/promise.js:172: if (deferred.resolve) { deferred.resolve(result); } And an explicit IS_UNDEFINED() ...
4 years, 2 months ago (2016-10-05 22:12:01 UTC) #22
gsathya
https://codereview.chromium.org/2396763002/diff/80001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2396763002/diff/80001/src/js/promise.js#newcode172 src/js/promise.js:172: if (deferred.resolve) { deferred.resolve(result); } On 2016/10/05 22:12:00, adamk ...
4 years, 2 months ago (2016-10-05 22:47:40 UTC) #25
adamk
lgtm! https://codereview.chromium.org/2396763002/diff/100001/src/js/promise.js File src/js/promise.js (right): https://codereview.chromium.org/2396763002/diff/100001/src/js/promise.js#newcode473 src/js/promise.js:473: resultCapability = { Can you add a TODO ...
4 years, 2 months ago (2016-10-05 23:05:40 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2396763002/2
4 years, 2 months ago (2016-10-05 23:07:32 UTC) #29
commit-bot: I haz the power
Committed patchset #7 (id:2)
4 years, 2 months ago (2016-10-05 23:35:50 UTC) #31
commit-bot: I haz the power
4 years, 2 months ago (2016-10-05 23:36:12 UTC) #33
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/4dc97f4a83fc2bb4193d6cc1779dd0763e0d5f4e
Cr-Commit-Position: refs/heads/master@{#40018}

Powered by Google App Engine
This is Rietveld 408576698