[webkit-changes] [WebKit/WebKit] f19ec4: Avoid including Document.h in DocumentParser and J...

Commit Queue noreply at github.com
Fri Mar 10 20:27:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f19ec43b36052596d3f894d7048c205606a35433
      https://github.com/WebKit/WebKit/commit/f19ec43b36052596d3f894d7048c205606a35433
  Author: Brent Fulgham <bfulgham at webkit.org>
  Date:   2023-03-10 (Fri, 10 Mar 2023)

  Changed paths:
    M Source/JavaScriptCore/runtime/JSSegmentedVariableObject.h
    M Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp
    M Source/WebCore/dom/DocumentParser.cpp
    M Source/WebCore/dom/DocumentParser.h
    M Source/WebCore/dom/RawDataDocumentParser.h
    M Source/WebCore/page/AbstractDOMWindow.h
    M Source/WebCore/page/DOMWindow.h

  Log Message:
  -----------
  Avoid including Document.h in DocumentParser and JSObject.h in JSSegmentedVariableObject.h
https://bugs.webkit.org/show_bug.cgi?id=253741
<rdar://problem/106579489>

Reviewed by Chris Dumez.

The Document.h and JSObject.h headers are very costly. They are included in a few places where they are not used:

1. DocumentParser.h doesn't need to include the header, and already includes it in its implementation file.
2. JSSegmentedVariableObject.h doesn't use the contents of JSObject.h at all, so pays a heavy price for no benefit.

These two changes save about 4 minutes of CPU time parsing, and about 0.75 minutes of codegen.

* Source/JavaScriptCore/runtime/JSSegmentedVariableObject.h:
* Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp:
* Source/WebCore/dom/DocumentParser.cpp:
* Source/WebCore/dom/DocumentParser.h:
* Source/WebCore/dom/RawDataDocumentParser.h:
* Source/WebCore/page/AbstractDOMWindow.h:
* Source/WebCore/page/DOMWindow.h:

Canonical link: https://commits.webkit.org/261538@main




More information about the webkit-changes mailing list