Bug 204354

Summary: [LFC][IFC] Assign inlineCapacity to various inline run vectors.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, esprehn+autocc, ews-watchlist, glenn, koivisto, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description zalan 2019-11-19 08:08:27 PST
ssia
Comment 1 Radar WebKit Bug Importer 2019-11-19 08:08:48 PST
<rdar://problem/57322347>
Comment 2 zalan 2019-11-19 08:14:03 PST
Created attachment 383869 [details]
Patch
Comment 3 zalan 2019-11-19 08:58:11 PST
Created attachment 383874 [details]
Patch
Comment 4 Antti Koivisto 2019-11-19 09:16:11 PST
Comment on attachment 383874 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=383874&action=review

> Source/WebCore/layout/inlineformatting/InlineFormattingState.h:43
> +using InlineItems = Vector<std::unique_ptr<InlineItem>, 30>;
> +using InlineRuns = Vector<std::unique_ptr<Display::Run>, 10>;
> +using LineBoxes = Vector<std::unique_ptr<LineBox>, 5>;

Maybe some of these can be Vector<Foo,..> instead of Vector<std::unique_ptr<Foo>,...> too? Would probably be faster if we can avoid heap allocations.

> Source/WebCore/layout/inlineformatting/InlineLine.h:72
> +        Run& operator=(Run&& other);

I don't see implementation of this. I suppose it is not needed if things compile/link.

If you need it, you can default it too.
Comment 5 Antti Koivisto 2019-11-19 09:17:50 PST
Also for any temporary vectors, it likely won't hurt to have more inline capacity than usually needed. No need to tune them to common case.
Comment 6 zalan 2019-11-19 10:20:31 PST
Created attachment 383879 [details]
Patch
Comment 7 WebKit Commit Bot 2019-11-19 10:58:11 PST
Comment on attachment 383879 [details]
Patch

Clearing flags on attachment: 383879

Committed r252638: <https://trac.webkit.org/changeset/252638>
Comment 8 WebKit Commit Bot 2019-11-19 10:58:13 PST
All reviewed patches have been landed.  Closing bug.