| Code-Review | +1 |
lgtm, but kinda puzzled over why this has no size impact.
constants, removing ~84 KB of duplicated string data.hmmm... android-binary-size shows this has no impact on size at all... My only guess is that all of these strings exist somewhere else in the binary as well, so this is just changing the constants from pointers into the global string pool to pointers into the manual string pool.
offset += len(name) + 1Nit add comment that the table itself does have duplicates, so still need to step over them.
namespace ukm {{nit: `namespace ukm::builders::internal {{`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
constants, removing ~84 KB of duplicated string data.hmmm... android-binary-size shows this has no impact on size at all... My only guess is that all of these strings exist somewhere else in the binary as well, so this is just changing the constants from pointers into the global string pool to pointers into the manual string pool.
checked this locally and the mechanism is slightly different: the strings aren't shared with a pool elsewhere, they were never in the shipped binary at all. The kEntryName / k*Name arrays are referenced almost exclusively from test code, so --gc-sections already strips them from chrome. I reproduced it with a release-style link (--gc-sections --icf=all): rodata is byte-identical with and without this patch when only the decode map is referenced, which matches the bot's zero delta.
The dedup is still real for binaries that do reference the name constants
Nit add comment that the table itself does have duplicates, so still need to step over them.
Done
nit: `namespace ukm::builders::internal {{`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
constants, removing ~84 KB of duplicated string data.Helmut Januschkahmmm... android-binary-size shows this has no impact on size at all... My only guess is that all of these strings exist somewhere else in the binary as well, so this is just changing the constants from pointers into the global string pool to pointers into the manual string pool.
checked this locally and the mechanism is slightly different: the strings aren't shared with a pool elsewhere, they were never in the shipped binary at all. The kEntryName / k*Name arrays are referenced almost exclusively from test code, so --gc-sections already strips them from chrome. I reproduced it with a release-style link (--gc-sections --icf=all): rodata is byte-identical with and without this patch when only the decode map is referenced, which matches the bot's zero delta.
The dedup is still real for binaries that do reference the name constants
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
lgtm, but kinda puzzled over why this has no size impact.
after landing of the first CL, changed HEAD to main, its now at +4B, wdyt, i am thinking about abandoning it!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Helmut Januschkalgtm, but kinda puzzled over why this has no size impact.
after landing of the first CL, changed HEAD to main, its now at +4B, wdyt, i am thinking about abandoning it!
yeah, without any wins, probably not worth the added complexity.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Helmut Januschka abandoned this change.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |