Bug 186717 - Better pack ResourceRequest
Summary: Better pack ResourceRequest
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-15 19:16 PDT by Chris Dumez
Modified: 2018-06-19 09:27 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.34 KB, patch)
2018-06-15 19:19 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (2.39 KB, patch)
2018-06-16 11:46 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-06-15 19:16:14 PDT
Better pack ResourceRequest to save some memory.
Comment 1 Chris Dumez 2018-06-15 19:19:33 PDT
Created attachment 342867 [details]
Patch
Comment 2 Simon Fraser (smfr) 2018-06-15 21:55:54 PDT
Comment on attachment 342867 [details]
Patch

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

> Source/WebCore/platform/network/ResourceRequestBase.h:245
> +    String m_initiatorIdentifier;
> +    String m_cachePartition { emptyString() };

Wouldn't it be better to move the Strings before the bools?
Comment 3 Chris Dumez 2018-06-16 11:46:19 PDT
Created attachment 342885 [details]
Patch
Comment 4 Chris Dumez 2018-06-16 11:46:38 PDT
(In reply to Simon Fraser (smfr) from comment #2)
> Comment on attachment 342867 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=342867&action=review
> 
> > Source/WebCore/platform/network/ResourceRequestBase.h:245
> > +    String m_initiatorIdentifier;
> > +    String m_cachePartition { emptyString() };
> 
> Wouldn't it be better to move the Strings before the bools?

It does not help but I moved them for cleanliness.
Comment 5 Darin Adler 2018-06-17 11:16:01 PDT
Comment on attachment 342885 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +        Better pack ResourceRequest to reduce its size from 240 to 232 bytes
> +        on Mac.

What helps us monitor this in the future? I can easily imagine I might ruin the packing if it was invisible to me that I was doing that.

Some kind of size static assertion?
Comment 6 WebKit Commit Bot 2018-06-18 15:14:39 PDT
Comment on attachment 342885 [details]
Patch

Clearing flags on attachment: 342885

Committed r232949: <https://trac.webkit.org/changeset/232949>
Comment 7 WebKit Commit Bot 2018-06-18 15:14:40 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-06-19 09:27:40 PDT
<rdar://problem/41252203>