Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-pack a few structures to see impact on code and RAM usage size #36995

Closed
wants to merge 9 commits into from

Conversation

andy31415
Copy link
Contributor

Expect some minmal changes.
No functionality chanes except moving of order of members (generally moved some larger members at the top and smaller ones at the end). Checked for a ARM32 target only.

Copy link

Review changes with  SemanticDiff

Copy link

github-actions bot commented Jan 8, 2025

PR #36995: Size comparison from dedef1f to 8724a35

Full report (3 builds for cc32xx, stm32)
platform target config section dedef1f 8724a35 change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 540049 539925 -124 -0.0
RAM 205800 205640 -160 -0.1
lock CC3235SF_LAUNCHXL FLASH 574217 574085 -132 -0.0
RAM 205944 205784 -160 -0.1
stm32 light STM32WB5MM-DK FLASH 485080 484976 -104 -0.0
RAM 144912 144816 -96 -0.1

@github-actions github-actions bot added the tests label Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

PR #36995: Size comparison from dedef1f to 5ac046e

Full report (70 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section dedef1f 5ac046e change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1354956 1354624 -332 -0.0
RAM 104152 104056 -96 -0.1
bl702 lighting-app bl702+eth FLASH 726256 726110 -146 -0.0
RAM 25361 25361 0 0.0
bl702+wifi FLASH 913126 912978 -148 -0.0
RAM 14101 14101 0 0.0
bl706+mfd+rpc+littlefs FLASH 1173960 1173806 -154 -0.0
RAM 23941 23941 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 1083028 1082874 -154 -0.0
RAM 16612 16612 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 840208 840088 -120 -0.0
RAM 123696 123600 -96 -0.1
lock-ftd LP_EM_CC1354P10_6 FLASH 825748 825628 -120 -0.0
RAM 125584 125488 -96 -0.1
pump-app LP_EM_CC1354P10_6 FLASH 772568 772468 -100 -0.0
RAM 114060 113964 -96 -0.1
pump-controller-app LP_EM_CC1354P10_6 FLASH 756748 756672 -76 -0.0
RAM 114260 114164 -96 -0.1
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 540049 539925 -124 -0.0
RAM 205800 205640 -160 -0.1
lock CC3235SF_LAUNCHXL FLASH 574217 574085 -132 -0.0
RAM 205944 205784 -160 -0.1
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 681745 681593 -152 -0.0
RAM 78756 78548 -208 -0.3
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 701597 701437 -160 -0.0
RAM 81396 81188 -208 -0.3
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 701597 701437 -160 -0.0
RAM 81396 81188 -208 -0.3
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 658525 658373 -152 -0.0
RAM 73824 73616 -208 -0.3
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 618369 618217 -152 -0.0
RAM 71748 71540 -208 -0.3
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 637997 637845 -152 -0.0
RAM 74292 74084 -208 -0.3
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 637997 637845 -152 -0.0
RAM 74292 74084 -208 -0.3
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 637769 637625 -144 -0.0
RAM 74756 74548 -208 -0.3
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 657477 657341 -136 -0.0
RAM 77300 77092 -208 -0.3
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 657477 657341 -136 -0.0
RAM 77300 77092 -208 -0.3
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 614389 614229 -160 -0.0
RAM 68844 68636 -208 -0.3
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 634241 634089 -152 -0.0
RAM 71476 71268 -208 -0.3
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 634241 634089 -152 -0.0
RAM 71476 71268 -208 -0.3
efr32 lock-app BRD4187C FLASH 932676 932548 -128 -0.0
RAM 160228 160036 -192 -0.1
BRD4338a FLASH 747160 747056 -104 -0.0
RAM 233356 233164 -192 -0.1
window-app BRD4187C FLASH 1025592 1025496 -96 -0.0
RAM 128332 128140 -192 -0.1
esp32 all-clusters-app c3devkit DRAM 95352 95256 -96 -0.1
FLASH 1541956 1541926 -30 -0.0
IRAM 82552 82552 0 0.0
m5stack DRAM 116332 116300 -32 -0.0
FLASH 1548154 1547946 -208 -0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4752 4752 0 0.0
FLASH 2730137 2729889 -248 -0.0
RAM 133096 133096 0 0.0
all-clusters-app debug unknown 5560 5560 0 0.0
FLASH 6018726 6018468 -258 -0.0
RAM 523992 523992 0 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5355204 5354946 -258 -0.0
RAM 243008 243008 0 0.0
bridge-app debug unknown 5472 5472 0 0.0
FLASH 4703618 4703360 -258 -0.0
RAM 221760 221760 0 0.0
chip-tool debug unknown 5992 5992 0 0.0
FLASH 12866788 12866598 -190 -0.0
RAM 582586 582586 0 0.0
chip-tool-ipv6only arm64 unknown 21400 21400 0 0.0
FLASH 10995728 10995680 -48 -0.0
RAM 633584 633584 0 0.0
fabric-admin debug unknown 5816 5816 0 0.0
FLASH 11272273 11272083 -190 -0.0
RAM 582930 582930 0 0.0
fabric-bridge-app debug unknown 4728 4728 0 0.0
FLASH 4528852 4528594 -258 -0.0
RAM 208880 208880 0 0.0
fabric-sync debug unknown 4968 4968 0 0.0
FLASH 5639429 5639157 -272 -0.0
RAM 475880 475880 0 0.0
lighting-app debug+rpc+ui unknown 6136 6136 0 0.0
FLASH 5639409 5639137 -272 -0.0
RAM 232008 232008 0 0.0
lock-app debug unknown 5408 5408 0 0.0
FLASH 4751986 4751728 -258 -0.0
RAM 208008 208008 0 0.0
ota-provider-app debug unknown 4768 4768 0 0.0
FLASH 4378612 4378354 -258 -0.0
RAM 201696 201696 0 0.0
ota-requestor-app debug unknown 4720 4720 0 0.0
FLASH 4517520 4517262 -258 -0.0
RAM 206280 206280 0 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3036685 3036445 -240 -0.0
RAM 160736 160736 0 0.0
thermostat-no-ble arm64 unknown 9584 9584 0 0.0
FLASH 4118968 4118920 -48 -0.0
RAM 246296 246296 0 0.0
tv-app debug unknown 5736 5736 0 0.0
FLASH 5988693 5988405 -288 -0.0
RAM 599312 599312 0 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11092685 11092397 -288 -0.0
RAM 695496 695496 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 918100 917880 -220 -0.0
RAM 143332 143236 -96 -0.1
nrf7002dk_nrf5340_cpuapp FLASH 890592 890368 -224 -0.0
RAM 141519 141423 -96 -0.1
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 852164 851980 -184 -0.0
RAM 142244 142148 -96 -0.1
nxp contact k32w0+release FLASH 585952 585856 -96 -0.0
RAM 71112 71016 -96 -0.1
mcxw71+release FLASH 600512 600360 -152 -0.0
RAM 63208 63112 -96 -0.2
light k32w0+release FLASH 612716 612620 -96 -0.0
RAM 70504 70408 -96 -0.1
k32w1+release FLASH 686920 686784 -136 -0.0
RAM 48840 48840 0 0.0
lock mcxw71+release FLASH 763264 763104 -160 -0.0
RAM 70876 70780 -96 -0.1
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1647500 1647308 -192 -0.0
RAM 212128 211968 -160 -0.1
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1555132 1554972 -160 -0.0
RAM 208944 208784 -160 -0.1
light cy8ckit_062s2_43012 FLASH 1470236 1470124 -112 -0.0
RAM 200912 200752 -160 -0.1
lock cy8ckit_062s2_43012 FLASH 1467956 1467860 -96 -0.0
RAM 225272 225112 -160 -0.1
qpg lighting-app qpg6105+debug FLASH 664328 664256 -72 -0.0
RAM 105456 105360 -96 -0.1
lock-app qpg6105+debug FLASH 622156 622084 -72 -0.0
RAM 99908 99812 -96 -0.1
stm32 light STM32WB5MM-DK FLASH 485080 484976 -104 -0.0
RAM 144912 144816 -96 -0.1
telink bridge-app tlsr9258a FLASH 683634 683562 -72 -0.0
RAM 91248 91152 -96 -0.1
contact-sensor-app tlsr9528a_retention FLASH 623874 623778 -96 -0.0
RAM 31488 31488 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 772708 772614 -94 -0.0
RAM 49348 49348 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 777324 777252 -72 -0.0
RAM 99812 99716 -96 -0.1
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 711316 711234 -82 -0.0
RAM 73544 73448 -96 -0.1
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 628320 628248 -72 -0.0
RAM 142180 142084 -96 -0.1
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 814334 814252 -82 -0.0
RAM 99724 99628 -96 -0.1
tizen all-clusters-app arm unknown 5160 5160 0 0.0
FLASH 1780980 1780880 -100 -0.0
RAM 93684 93684 0 0.0
chip-tool-ubsan arm unknown 10844 10844 0 0.0
FLASH 17999086 17999006 -80 -0.0
RAM 7855832 7855844 12 0.0

@andy31415
Copy link
Contributor Author

Closing this one as an experiment only: some of the changes are on the ugly side maintainability-wise. We should probably improve things one by one (structure by structure) and weigh pros/cons instead.

#36996 remains open as a concept to optimize resources.

@andy31415 andy31415 closed this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant