|
|
Chromium Code Reviews|
Created:
4 years, 2 months ago by hiroshige Modified:
3 years, 11 months ago CC:
chromium-reviews, Yoav Weiss, blink-reviews-html_chromium.org, gavinp+prerender_chromium.org, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, kinuko+watch, rwlbuis Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionCall checkCompleted() synchronously in HTMLLinkElement::dispatchPendingEvent()
Previously, there was an asynchronous hop from <link>'s load event to
document's load event, because HTMLLinkElement::dispatchPendingEvent()
scheduled checkCompleted() asynchronously via IncrementLoadEventDelayCount.
This CL makes HTMLLinkElement::dispatchPendingEvent() to call checkCompleted()
synchronously, by using
IncrementLoadEventDelayCount::clearAndCheckLoadEvent().
Because checkCompleted() is called at the end of asynchronously called
HTMLLinkElement::dispatchPendingEvent(), this CL doesn't increase synchronous
timing dependencies around Document load events.
This CL fixes the performance regression of smoothness.top_25_smooth on
Mac 10.10 caused by https://codereview.chromium.org/2275493002/.
BUG=648887, 624697
Review-Url: https://codereview.chromium.org/2391923002
Cr-Commit-Position: refs/heads/master@{#444965}
Committed: https://chromium.googlesource.com/chromium/src/+/46649a2f0bf126330d95f47b6c8773823451d23f
Patch Set 1 #Patch Set 2 : CL for src perf tryjob to run smoothness.top_25_smooth benchmark on mac-10-10 platform(s) #Patch Set 3 : CL for src perf tryjob to run smoothness.top_25_smooth benchmark on mac-10-10 platform(s) #Patch Set 4 : CL for src perf tryjob to run smoothness.top_25_smooth benchmark on mac-10-10 platform(s) #Patch Set 5 : Add comments, make private #Patch Set 6 : COmment #Patch Set 7 : Check Document onload synchronously in HTMLLinkElement::dispatchPendingEvent() #Patch Set 8 : Rebase. #Patch Set 9 : Rebase #Patch Set 10 : Rebase #
Messages
Total messages: 63 (41 generated)
CL for src perf tryjob to run smoothness.top_25_smooth benchmark on mac-10-10 platform(s)
CL for src perf tryjob to run smoothness.top_25_smooth benchmark on mac-10-10 platform(s)
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
CL for src perf tryjob to run smoothness.top_25_smooth benchmark on mac-10-10 platform(s)
Description was changed from ========== CL for src perf tryjob to run smoothness.top_25_smooth benchmark on mac-10-10 platform(s) ========== to ========== Dispatch Document load event synchronously after HTMLLinkElement load event This CL is to fix performance regression of smoothness.top_25_smooth on Mac 10.10 caused by [1]. Before [1], both load events of Document and HTMLLinkElement could be called in Document::implicitClose() without an asynchronous postTask() between them. [1] made the Document load event always called asynchronously after the load event of HTMLLinkElement (via Document::decrementLoadEventDelayCount()). This CL calls FrameLoader::checkCompleted() synchronously just after a HTMLLinkElement's load event, to call a Document load event if applicable. Because checkCompleted() is called at the end of asynchronously called HTMLLinkElement::dispatchPendingEvent(), this CL doesn't increase synchronous timing dependencies around Document load events. [1] https://codereview.chromium.org/2275493002 BUG=648887, 624697 ==========
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
hiroshige@chromium.org changed reviewers: + haraken@chromium.org, nhiroki@chromium.org, yhirano@chromium.org
WDYT?
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/10/04 10:33:05, hiroshige wrote: > WDYT? The code looks correct but I don't have enough expertise to see if the metrics you are trying to improve is important enough to justify the extra complexity.
hiroshige@chromium.org changed reviewers: + vmiura@chromium.org
On 2016/10/06 01:44:06, yhirano wrote: > On 2016/10/04 10:33:05, hiroshige wrote: > > WDYT? > > The code looks correct but I don't have enough expertise to see if the metrics > you are trying to improve is important enough to justify the extra complexity. +vmiura@ as smoothness.top_25_smooth owner. How important is it to fix a Mac10.10-only regression of smoothness.top_25_smooth (Issue 648887)?
On 2016/10/06 03:08:02, hiroshige (OOO) wrote: > On 2016/10/06 01:44:06, yhirano wrote: > > On 2016/10/04 10:33:05, hiroshige wrote: > > > WDYT? > > > > The code looks correct but I don't have enough expertise to see if the metrics > > you are trying to improve is important enough to justify the extra complexity. > > +vmiura@ as smoothness.top_25_smooth owner. > How important is it to fix a Mac10.10-only regression of > smoothness.top_25_smooth (Issue 648887)? Issue 648887 was closed as WontFix, so closing this CL also.
hiroshige@chromium.org changed reviewers: - haraken@chromium.org, nhiroki@chromium.org, vmiura@chromium.org, yhirano@chromium.org
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
Description was changed from ========== Dispatch Document load event synchronously after HTMLLinkElement load event This CL is to fix performance regression of smoothness.top_25_smooth on Mac 10.10 caused by [1]. Before [1], both load events of Document and HTMLLinkElement could be called in Document::implicitClose() without an asynchronous postTask() between them. [1] made the Document load event always called asynchronously after the load event of HTMLLinkElement (via Document::decrementLoadEventDelayCount()). This CL calls FrameLoader::checkCompleted() synchronously just after a HTMLLinkElement's load event, to call a Document load event if applicable. Because checkCompleted() is called at the end of asynchronously called HTMLLinkElement::dispatchPendingEvent(), this CL doesn't increase synchronous timing dependencies around Document load events. [1] https://codereview.chromium.org/2275493002 BUG=648887, 624697 ========== to ========== Call checkCompleted() synchronously in HTMLLinkElement::dispatchPendingEvent() Previously, there was an asynchronous hop from <link>'s load event to document's load event, because HTMLLinkElement::dispatchPendingEvent() scheduled checkCompleted() asynchronously via IncrementLoadEventDelayCount. This CL makes HTMLLinkElement::dispatchPendingEvent() to call checkCompleted() synchronously, by using IncrementLoadEventDelayCount::clearAndCheckLoadEvent(). Because checkCompleted() is called at the end of asynchronously called HTMLLinkElement::dispatchPendingEvent(), this CL doesn't increase synchronous timing dependencies around Document load events. This CL fixes the performance regression of smoothness.top_25_smooth on Mac 10.10 caused by https://codereview.chromium.org/2275493002/. BUG=648887, 624697 ==========
hiroshige@chromium.org changed reviewers: + japhet@chromium.org, yhirano@chromium.org
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Hi Hirano-san, I reopened this issue because calling checkCompleted() sync also resolves the performance regression caused by HTMLStyleElement's EventSender removal (https://codereview.chromium.org/2605173002#ps40001), and now I feel this might prevent potential performance issues. I create a separate CL that adds synchronous checkCompleted() functionality to IncrementLoadEventDelayCount: https://codereview.chromium.org/2605383002/ and make this CL to use it. Could you take a look again?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
japhet@, could you also take a look as a core/ OWNER? Thanks!
lgtm
The CQ bit was checked by hiroshige@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by hiroshige@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for third_party/WebKit/Source/core/html/HTMLLinkElement.h:
While running git apply --index -p1;
error: patch failed: third_party/WebKit/Source/core/html/HTMLLinkElement.h:120
error: third_party/WebKit/Source/core/html/HTMLLinkElement.h: patch does not
apply
Patch: third_party/WebKit/Source/core/html/HTMLLinkElement.h
Index: third_party/WebKit/Source/core/html/HTMLLinkElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.h
b/third_party/WebKit/Source/core/html/HTMLLinkElement.h
index
22351de853c80fea82c1c8c45258221d26943d48..b79f54789512cc2f8a1ab78954e06a250ee24d75
100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.h
@@ -88,7 +88,6 @@ class CORE_EXPORT HTMLLinkElement final : public HTMLElement,
DOMTokenList* sizes() const;
- void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
void scheduleEvent();
// From LinkLoaderClient
@@ -120,6 +119,10 @@ class CORE_EXPORT HTMLLinkElement final : public
HTMLElement,
void process();
static void processCallback(Node*);
+ // Always call this asynchronously because this can cause synchronous
+ // Document load event and JavaScript execution.
+ void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
+
// From Node and subclassses
void parseAttribute(const QualifiedName&,
const AtomicString&,
The CQ bit was checked by hiroshige@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for third_party/WebKit/Source/core/html/HTMLLinkElement.h:
While running git apply --index -p1;
error: patch failed: third_party/WebKit/Source/core/html/HTMLLinkElement.h:120
error: third_party/WebKit/Source/core/html/HTMLLinkElement.h: patch does not
apply
Patch: third_party/WebKit/Source/core/html/HTMLLinkElement.h
Index: third_party/WebKit/Source/core/html/HTMLLinkElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.h
b/third_party/WebKit/Source/core/html/HTMLLinkElement.h
index
22351de853c80fea82c1c8c45258221d26943d48..b79f54789512cc2f8a1ab78954e06a250ee24d75
100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.h
@@ -88,7 +88,6 @@ class CORE_EXPORT HTMLLinkElement final : public HTMLElement,
DOMTokenList* sizes() const;
- void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
void scheduleEvent();
// From LinkLoaderClient
@@ -120,6 +119,10 @@ class CORE_EXPORT HTMLLinkElement final : public
HTMLElement,
void process();
static void processCallback(Node*);
+ // Always call this asynchronously because this can cause synchronous
+ // Document load event and JavaScript execution.
+ void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
+
// From Node and subclassses
void parseAttribute(const QualifiedName&,
const AtomicString&,
The CQ bit was checked by hiroshige@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for third_party/WebKit/Source/core/html/HTMLLinkElement.h:
While running git apply --index -p1;
error: patch failed: third_party/WebKit/Source/core/html/HTMLLinkElement.h:120
error: third_party/WebKit/Source/core/html/HTMLLinkElement.h: patch does not
apply
Patch: third_party/WebKit/Source/core/html/HTMLLinkElement.h
Index: third_party/WebKit/Source/core/html/HTMLLinkElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.h
b/third_party/WebKit/Source/core/html/HTMLLinkElement.h
index
22351de853c80fea82c1c8c45258221d26943d48..b79f54789512cc2f8a1ab78954e06a250ee24d75
100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.h
@@ -88,7 +88,6 @@ class CORE_EXPORT HTMLLinkElement final : public HTMLElement,
DOMTokenList* sizes() const;
- void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
void scheduleEvent();
// From LinkLoaderClient
@@ -120,6 +119,10 @@ class CORE_EXPORT HTMLLinkElement final : public
HTMLElement,
void process();
static void processCallback(Node*);
+ // Always call this asynchronously because this can cause synchronous
+ // Document load event and JavaScript execution.
+ void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
+
// From Node and subclassses
void parseAttribute(const QualifiedName&,
const AtomicString&,
The CQ bit was checked by hiroshige@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by hiroshige@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from japhet@chromium.org, yhirano@chromium.org Link to the patchset: https://codereview.chromium.org/2391923002/#ps180001 (title: "Rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 180001, "attempt_start_ts": 1484876966147720,
"parent_rev": "fbd10854de98cb409beb7fe940f458539555b2e0", "commit_rev":
"46649a2f0bf126330d95f47b6c8773823451d23f"}
Message was sent while issue was closed.
Description was changed from ========== Call checkCompleted() synchronously in HTMLLinkElement::dispatchPendingEvent() Previously, there was an asynchronous hop from <link>'s load event to document's load event, because HTMLLinkElement::dispatchPendingEvent() scheduled checkCompleted() asynchronously via IncrementLoadEventDelayCount. This CL makes HTMLLinkElement::dispatchPendingEvent() to call checkCompleted() synchronously, by using IncrementLoadEventDelayCount::clearAndCheckLoadEvent(). Because checkCompleted() is called at the end of asynchronously called HTMLLinkElement::dispatchPendingEvent(), this CL doesn't increase synchronous timing dependencies around Document load events. This CL fixes the performance regression of smoothness.top_25_smooth on Mac 10.10 caused by https://codereview.chromium.org/2275493002/. BUG=648887, 624697 ========== to ========== Call checkCompleted() synchronously in HTMLLinkElement::dispatchPendingEvent() Previously, there was an asynchronous hop from <link>'s load event to document's load event, because HTMLLinkElement::dispatchPendingEvent() scheduled checkCompleted() asynchronously via IncrementLoadEventDelayCount. This CL makes HTMLLinkElement::dispatchPendingEvent() to call checkCompleted() synchronously, by using IncrementLoadEventDelayCount::clearAndCheckLoadEvent(). Because checkCompleted() is called at the end of asynchronously called HTMLLinkElement::dispatchPendingEvent(), this CL doesn't increase synchronous timing dependencies around Document load events. This CL fixes the performance regression of smoothness.top_25_smooth on Mac 10.10 caused by https://codereview.chromium.org/2275493002/. BUG=648887, 624697 Review-Url: https://codereview.chromium.org/2391923002 Cr-Commit-Position: refs/heads/master@{#444965} Committed: https://chromium.googlesource.com/chromium/src/+/46649a2f0bf126330d95f47b6c87... ==========
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as https://chromium.googlesource.com/chromium/src/+/46649a2f0bf126330d95f47b6c87... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
