Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: faeb8e9159788867f142074876979f39af8ebeb0
      
https://github.com/WebKit/WebKit/commit/faeb8e9159788867f142074876979f39af8ebeb0
  Author: Yusuke Suzuki <[email protected]>
  Date:   2024-04-19 (Fri, 19 Apr 2024)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.h

  Log Message:
  -----------
  [WebCore] AbstractLineBuilder::m_wrapOpportunityList should have 
inlineCapacity coverting most of cases
https://bugs.webkit.org/show_bug.cgi?id=272966
rdar://126741662

Reviewed by Alan Baradlay.

We found that AbstractLineBuilder::m_wrapOpportunityList is causing frequent 
malloc and free in the hot path.
This patch adds 32 inlineCapacity and uses `shrink(0)` to keep once-allocated 
capacity during LineBuilder's lifetime.
This 32 number gets picked from data collection in existing benchmarks.

* Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.cpp:
(WebCore::Layout::AbstractLineBuilder::reset):
* Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to