Bug 204354 - [LFC][IFC] Assign inlineCapacity to various inline run vectors.
Summary: [LFC][IFC] Assign inlineCapacity to various inline run vectors.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-19 08:08 PST by zalan
Modified: 2019-11-19 10:58 PST (History)
11 users (show)

See Also:


Attachments
Patch (4.45 KB, patch)
2019-11-19 08:14 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (8.71 KB, patch)
2019-11-19 08:58 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (10.27 KB, patch)
2019-11-19 10:20 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.