WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
134258
[XHR] Realign bool members of XmlHttpRequest to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=134258
Summary
[XHR] Realign bool members of XmlHttpRequest to reduce padding
Mahesh Kulkarni
Reported
2014-06-24 11:51:06 PDT
[XHR] Realign bool members of XmlHttpRequest to reduce padding
Attachments
Patch
(3.48 KB, patch)
2014-06-24 11:53 PDT
,
Mahesh Kulkarni
bfulgham
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mahesh Kulkarni
Comment 1
2014-06-24 11:53:29 PDT
Created
attachment 233723
[details]
Patch
Laszlo Gombos
Comment 2
2014-06-24 17:35:00 PDT
+ Alexey
Alexey Proskuryakov
Comment 3
2014-06-24 21:47:43 PDT
I guess it's OK to do, but it also seems pretty pointless. Is there a measurable improvement on any test from this patch?
Mahesh Kulkarni
Comment 4
2014-06-26 08:43:17 PDT
(In reply to
comment #3
)
> I guess it's OK to do, but it also seems pretty pointless. Is there a measurable improvement on any test from this patch?
ap, with this minor optimization in realigning order of bool members, sizeof(xhr) is down by 16bytes (on 64bit machine. Also generally a good practice to move all small members towards the end of class). Though xhr aren't objects kept for long in memory, idea behind this patch to help readability and good practice (i.e Using bitfields/bitmask saves same amount of memory but effects code readability).
Brent Fulgham
Comment 5
2016-03-14 11:31:09 PDT
Comment on
attachment 233723
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=233723&action=review
This patch is too old to apply cleanly. However, I strongly agree with the code change. Could you please update this so that it applies against current sources?
> Source/WebCore/xml/XMLHttpRequest.h:259 > bool m_responseCacheIsValid;
If you are making this change, please use C++11 initialization.
Rob Buis
Comment 6
2019-02-15 12:01:56 PST
This is fixed using bitfields in ToT.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug