| Summary: | [XHR] Realign bool members of XmlHttpRequest to reduce padding | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mahesh Kulkarni <maheshk> | ||||
| Component: | New Bugs | Assignee: | Mahesh Kulkarni <maheshk> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | ap, bunhere, cdumez, commit-queue, gyuyoung.kim, laszlo.gombos, rbuis, sergio | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Mahesh Kulkarni
2014-06-24 11:51:06 PDT
Created attachment 233723 [details]
Patch
+ Alexey I guess it's OK to do, but it also seems pretty pointless. Is there a measurable improvement on any test from this patch? (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). 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. This is fixed using bitfields in ToT. |