Closed
Bug 717311
Opened 14 years ago
Closed 14 years ago
gfxUnicodePropertyData.cpp:sCatEAWValues takes up more space than it should
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla12
People
(Reporter: froydnj, Assigned: froydnj)
Details
Attachments
(1 file, 1 obsolete file)
|
2.94 KB,
patch
|
jfkthame
:
review+
|
Details | Diff | Splinter Review |
gfxUnicodePropertyData.cpp:sCatEAWValues is an array of:
struct {
unsigned int mEAW:3;
unsigned int mCategory:5;
}
Unfortunately, this actually winds up wasting space because of structure padding inserted to maintain alignment.
Patch coming up.
| Assignee | ||
Comment 1•14 years ago
|
||
Instead of using a structure with bitfields, pack things manually.
Saves a little over 70K of data.
Attachment #587753 -
Flags: review?(jfkthame)
Comment 2•14 years ago
|
||
Hmm... you're right, it does end up wasting space. :( However, wouldn't a simpler patch be to declare the fields as unsigned char (with the appropriate field widths)? That would avoid the need for manually packing/unpacking the fields, which just makes the code more opaque.
| Assignee | ||
Comment 3•14 years ago
|
||
Indeed, that works just as well and produces a much smaller patch. :)
Attachment #587753 -
Attachment is obsolete: true
Attachment #587753 -
Flags: review?(jfkthame)
Attachment #587875 -
Flags: review?(jfkthame)
Comment 4•14 years ago
|
||
Comment on attachment 587875 [details] [diff] [review]
change bitfield datatype
Great, let's go with this - thanks.
Attachment #587875 -
Flags: review?(jfkthame) → review+
| Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 5•14 years ago
|
||
Keywords: checkin-needed
Target Milestone: --- → mozilla12
Comment 6•14 years ago
|
||
Backed out of inbound, since that push caused test crashes, though presumably just bug 708075:
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=f94f83c7f2df
https://hg.mozilla.org/integration/mozilla-inbound/rev/76fc8cdd2a31
Target Milestone: mozilla12 → ---
Comment 7•14 years ago
|
||
Re-landed on inbound, as this wasn't responsible for the problems on the previous push:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e52edb8a534
Target Milestone: --- → mozilla12
Comment 8•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•