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

Add ListNotifications on DataModelProvider #37526

Merged

Conversation

tersal
Copy link
Contributor

@tersal tersal commented Feb 11, 2025

Fixes #37307

The intention is to remove direct calls to AAI from WriteHandler, instead doing it through calls to DataModel::Provider. This to allow a more complete decoupling between these layers.

Testing

Tested with Unit Test suites.

Copy link

Review changes with  SemanticDiff

@github-actions github-actions bot added the app label Feb 11, 2025
Copy link

github-actions bot commented Feb 11, 2025

PR #37526: Size comparison from 9c8cb33 to 5d233a2

Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 9c8cb33 5d233a2 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094978 1094916 -62 -0.0
RAM 103370 103370 0 0.0
bl702 lighting-app bl702+eth FLASH 650834 650768 -66 -0.0
RAM 25289 25289 0 0.0
bl702+wifi FLASH 828766 828700 -66 -0.0
RAM 13997 13997 0 0.0
bl706+mfd+rpc+littlefs FLASH 1058036 1057970 -66 -0.0
RAM 23901 23901 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888884 888818 -66 -0.0
RAM 18512 18512 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971926 971860 -66 -0.0
RAM 16376 16376 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838396 838428 32 0.0
RAM 123480 123480 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823816 823840 24 0.0
RAM 125360 125360 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770984 771024 40 0.0
RAM 113820 113820 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755244 755292 48 0.0
RAM 114028 114028 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538894 538926 32 0.0
RAM 205208 205208 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572758 572790 32 0.0
RAM 205360 205360 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679765 679805 40 0.0
RAM 78548 78548 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699625 699665 40 0.0
RAM 81188 81188 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699625 699665 40 0.0
RAM 81188 81188 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656549 656589 40 0.0
RAM 73616 73616 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616101 616133 32 0.0
RAM 71532 71532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635745 635777 32 0.0
RAM 74076 74076 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635745 635777 32 0.0
RAM 74076 74076 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635613 635645 32 0.0
RAM 74540 74540 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 655329 655361 32 0.0
RAM 77084 77084 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 655329 655361 32 0.0
RAM 77084 77084 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611953 611993 40 0.0
RAM 68628 68628 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631813 631853 40 0.0
RAM 71268 71268 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631813 631853 40 0.0
RAM 71268 71268 0 0.0
efr32 lock-app BRD4187C FLASH 937088 937120 32 0.0
RAM 159904 159904 0 0.0
BRD4338a FLASH 730340 730396 56 0.0
RAM 234716 234716 0 0.0
window-app BRD4187C FLASH 1029648 1029720 72 0.0
RAM 128008 128008 0 0.0
esp32 all-clusters-app c3devkit DRAM 97312 97312 0 0.0
FLASH 1577408 1577440 32 0.0
IRAM 83820 83820 0 0.0
m5stack DRAM 116100 116100 0 0.0
FLASH 1545102 1545170 68 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4760 4760 0 0.0
FLASH 2708611 2709021 410 0.0
RAM 132784 132816 32 0.0
all-clusters-app debug unknown 5568 5568 0 0.0
FLASH 5975074 5975484 410 0.0
RAM 531600 531632 32 0.0
all-clusters-minimal-app debug unknown 5464 5464 0 0.0
FLASH 5322586 5322996 410 0.0
RAM 242712 242744 32 0.0
bridge-app debug unknown 5480 5480 0 0.0
FLASH 4681230 4681638 408 0.0
RAM 221448 221464 16 0.0
chip-tool debug unknown 6120 6120 0 0.0
FLASH 13098792 13099202 410 0.0
RAM 596578 596578 0 0.0
chip-tool-ipv6only arm64 unknown 21816 21816 0 0.0
FLASH 11162160 11162544 384 0.0
RAM 648256 648264 8 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11387841 11388249 408 0.0
RAM 596362 596362 0 0.0
fabric-bridge-app debug unknown 4736 4736 0 0.0
FLASH 4506552 4506960 408 0.0
RAM 208632 208664 32 0.0
fabric-sync debug unknown 4976 4976 0 0.0
FLASH 5612805 5613221 416 0.0
RAM 483504 483520 16 0.0
lighting-app debug+rpc+ui unknown 6152 6152 0 0.0
FLASH 5645489 5645905 416 0.0
RAM 231792 231824 32 0.0
lock-app debug unknown 5416 5416 0 0.0
FLASH 4730626 4731034 408 0.0
RAM 207696 207712 16 0.0
ota-provider-app debug unknown 4776 4776 0 0.0
FLASH 4359692 4360100 408 0.0
RAM 201336 201352 16 0.0
ota-requestor-app debug unknown 4728 4728 0 0.0
FLASH 4497036 4497444 408 0.0
RAM 205920 205936 16 0.0
shell debug unknown 4256 4256 0 0.0
FLASH 3005340 3005740 400 0.0
RAM 160552 160552 0 0.0
thermostat-no-ble arm64 unknown 9512 9512 0 0.0
FLASH 4096408 4096792 384 0.0
RAM 246024 246032 8 0.0
tv-app debug unknown 5744 5744 0 0.0
FLASH 5951749 5952165 416 0.0
RAM 606904 606920 16 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11271549 11271965 416 0.0
RAM 710864 710880 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 907452 907488 36 0.0
RAM 142411 142411 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 901932 901984 52 0.0
RAM 124755 124755 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846072 846104 32 0.0
RAM 141339 141339 0 0.0
nxp contact k32w0+release FLASH 584744 584776 32 0.0
RAM 70876 70876 0 0.0
mcxw71+release FLASH 600184 600224 40 0.0
RAM 63096 63096 0 0.0
light k32w0+release FLASH 611052 611084 32 0.0
RAM 70268 70268 0 0.0
k32w1+release FLASH 685504 685536 32 0.0
RAM 48680 48680 0 0.0
lock mcxw71+release FLASH 749008 749040 32 0.0
RAM 67500 67500 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646732 1646788 56 0.0
RAM 211576 211576 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553500 1553556 56 0.0
RAM 208392 208392 0 0.0
light cy8ckit_062s2_43012 FLASH 1469428 1469484 56 0.0
RAM 200368 200368 0 0.0
lock cy8ckit_062s2_43012 FLASH 1467364 1467420 56 0.0
RAM 224704 224704 0 0.0
qpg lighting-app qpg6105+debug FLASH 662324 662348 24 0.0
RAM 105220 105220 0 0.0
lock-app qpg6105+debug FLASH 620112 620152 40 0.0
RAM 99664 99664 0 0.0
stm32 light STM32WB5MM-DK FLASH 482992 483024 32 0.0
RAM 144688 144688 0 0.0
telink bridge-app tl7218x FLASH 665214 665238 24 0.0
RAM 90828 90828 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621896 621920 24 0.0
RAM 31488 31488 0 0.0
light-app-ota-shell-factory-data tl3218x FLASH 770882 770906 24 0.0
RAM 43568 43568 0 0.0
tl7218x FLASH 779352 779376 24 0.0
RAM 100752 100752 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 680666 680690 24 0.0
RAM 52192 52192 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709228 709252 24 0.0
RAM 73400 73400 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 626174 626198 24 0.0
RAM 142032 142032 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 814004 814028 24 0.0
RAM 99608 99608 0 0.0
tizen all-clusters-app arm unknown 5104 5104 0 0.0
FLASH 1751644 1751868 224 0.0
RAM 93508 93516 8 0.0
chip-tool-ubsan arm unknown 11396 11396 0 0.0
FLASH 18683046 18684062 1016 0.0
RAM 8181084 8181540 456 0.0

andy31415 added a commit to andy31415/connectedhomeip that referenced this pull request Feb 12, 2025
This defines a ServerClusterInterface class along with a registry.
Also slight update to build_coverage to run on more (specifically my) machines without errors.

Implementation notes:

- Registry does NOT allow anymore to have "wildcard register" on endpoints. This is because we expect to have
  attribute members (no more "free/implicit" storage from ember buffers).
- Interface now includes metadata for attributes (AAI does not) and maintains the cluster version.
- This does not yet include changes in project-chip#37526 (so no AAI replacement for list begin/end) as that interface
  gets finalized. It will have it once that PR is finalized and merged.
- Registry has no "cache" but uses a "move found item to front of list". This is ok for individual requests
  however for full iterations it would be slower (about 2x if we always iterate over all clusters ... since
  then average search would be N instead of N/2 for a list that never changes). We can revisit this approach at any time

This is currently unused. I expect usages to add flash & RAM cost, that will be slowly offset (especially RAM) as
we move clusters around:

- RAM for linked list will be one list instead of 2 (AAI to CHI) so any cluster moved
  that uses both would save 1 pointer metadata will increase slightly, can be reduced
  if we get ember to stop generating metadata for included clusters
- RAM can decrease by FeatureMap and ClusterRevision if we stop ember from allocating
  space for it (however we will offset this by flash "encode const value").
- RAM usage increases slightly during conversion for "store version data" which ember currently
  allocates for all clusters.
- Very long term: if we replace all clusters, we can drop AAI/CHI and that would save some flash.
  Still expect no savings because new interface does all of AAI and CHI and a bit more.

TLDR on resourcing: probably ok on RAM over time, there is a flash overhead for this,
     claiming this is important for testable and maintainable code in the future.
Copy link

github-actions bot commented Feb 12, 2025

PR #37526: Size comparison from 9c8cb33 to 1a61b04

Increases above 0.2%:

platform target config section 9c8cb33 1a61b04 change % change
bl702 lighting-app bl702+eth RAM 25289 33633 8344 33.0
bl702+wifi RAM 13997 22341 8344 59.6
bl706+mfd+rpc+littlefs FLASH 1058036 1061652 3616 0.3
RAM 23901 32285 8384 35.1
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888884 892782 3898 0.4
RAM 18512 26912 8400 45.4
lighting-app bl702l+mfd+littlefs FLASH 971926 975896 3970 0.4
RAM 16376 24752 8376 51.1
esp32 all-clusters-app c3devkit FLASH 1577408 1581708 4300 0.3
m5stack FLASH 1545102 1549674 4572 0.3
Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 9c8cb33 1a61b04 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094978 1095898 920 0.1
RAM 103370 94906 -8464 -8.2
bl702 lighting-app bl702+eth FLASH 650834 652014 1180 0.2
RAM 25289 33633 8344 33.0
bl702+wifi FLASH 828766 828506 -260 -0.0
RAM 13997 22341 8344 59.6
bl706+mfd+rpc+littlefs FLASH 1058036 1061652 3616 0.3
RAM 23901 32285 8384 35.1
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888884 892782 3898 0.4
RAM 18512 26912 8400 45.4
lighting-app bl702l+mfd+littlefs FLASH 971926 975896 3970 0.4
RAM 16376 24752 8376 51.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838396 815228 -23168 -2.8
RAM 123480 120352 -3128 -2.5
lock-ftd LP_EM_CC1354P10_6 FLASH 823816 823864 48 0.0
RAM 125360 125360 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770984 771040 56 0.0
RAM 113820 113820 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755244 755300 56 0.0
RAM 114028 114028 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538894 538950 56 0.0
RAM 205208 205208 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572758 572806 48 0.0
RAM 205360 205360 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679765 656541 -23224 -3.4
RAM 78548 75420 -3128 -4.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699625 676401 -23224 -3.3
RAM 81188 78060 -3128 -3.9
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699625 676401 -23224 -3.3
RAM 81188 78060 -3128 -3.9
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656549 633325 -23224 -3.5
RAM 73616 70488 -3128 -4.2
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616101 616157 56 0.0
RAM 71532 71532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635745 635793 48 0.0
RAM 74076 74076 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635745 635793 48 0.0
RAM 74076 74076 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635613 635661 48 0.0
RAM 74540 74540 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 655329 655377 48 0.0
RAM 77084 77084 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 655329 655377 48 0.0
RAM 77084 77084 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611953 612001 48 0.0
RAM 68628 68628 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631813 631861 48 0.0
RAM 71268 71268 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631813 631861 48 0.0
RAM 71268 71268 0 0.0
efr32 lock-app BRD4187C FLASH 937088 937296 208 0.0
RAM 159904 159908 4 0.0
BRD4338a FLASH 730340 730640 300 0.0
RAM 234716 234720 4 0.0
window-app BRD4187C FLASH 1029648 1029928 280 0.0
RAM 128008 128012 4 0.0
esp32 all-clusters-app c3devkit DRAM 97312 97312 0 0.0
FLASH 1577408 1581708 4300 0.3
IRAM 83820 83820 0 0.0
m5stack DRAM 116100 116100 0 0.0
FLASH 1545102 1549674 4572 0.3
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4760 4760 0 0.0
FLASH 2708611 2709157 546 0.0
RAM 132784 132816 32 0.0
all-clusters-app debug unknown 5568 5568 0 0.0
FLASH 5975074 5975620 546 0.0
RAM 531600 531632 32 0.0
all-clusters-minimal-app debug unknown 5464 5464 0 0.0
FLASH 5322586 5323164 578 0.0
RAM 242712 242744 32 0.0
bridge-app debug unknown 5480 5480 0 0.0
FLASH 4681230 4681806 576 0.0
RAM 221448 221464 16 0.0
chip-tool debug unknown 6120 6120 0 0.0
FLASH 13098792 13099370 578 0.0
RAM 596578 596578 0 0.0
chip-tool-ipv6only arm64 unknown 21816 21816 0 0.0
FLASH 11162160 11162608 448 0.0
RAM 648256 648264 8 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11387841 11388385 544 0.0
RAM 596362 596362 0 0.0
fabric-bridge-app debug unknown 4736 4736 0 0.0
FLASH 4506552 4507128 576 0.0
RAM 208632 208664 32 0.0
fabric-sync debug unknown 4976 4976 0 0.0
FLASH 5612805 5613381 576 0.0
RAM 483504 483520 16 0.0
lighting-app debug+rpc+ui unknown 6152 6152 0 0.0
FLASH 5645489 5484929 -160560 -2.8
RAM 231792 225424 -6368 -2.7
lock-app debug unknown 5416 5416 0 0.0
FLASH 4730626 4731202 576 0.0
RAM 207696 207712 16 0.0
ota-provider-app debug unknown 4776 4776 0 0.0
FLASH 4359692 4360236 544 0.0
RAM 201336 201352 16 0.0
ota-requestor-app debug unknown 4728 4728 0 0.0
FLASH 4497036 4497612 576 0.0
RAM 205920 205936 16 0.0
shell debug unknown 4256 4256 0 0.0
FLASH 3005340 3005884 544 0.0
RAM 160552 160552 0 0.0
thermostat-no-ble arm64 unknown 9512 9512 0 0.0
FLASH 4096408 4096872 464 0.0
RAM 246024 246032 8 0.0
tv-app debug unknown 5744 5744 0 0.0
FLASH 5951749 5952293 544 0.0
RAM 606904 606920 16 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11271549 11272125 576 0.0
RAM 710864 710880 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 907452 907500 48 0.0
RAM 142411 142411 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 901932 901976 44 0.0
RAM 124755 124755 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846072 846116 44 0.0
RAM 141339 141339 0 0.0
nxp contact k32w0+release FLASH 584744 584792 48 0.0
RAM 70876 70876 0 0.0
mcxw71+release FLASH 600184 600240 56 0.0
RAM 63096 63096 0 0.0
light k32w0+release FLASH 611052 611116 64 0.0
RAM 70268 70268 0 0.0
k32w1+release FLASH 685504 685560 56 0.0
RAM 48680 48680 0 0.0
lock mcxw71+release FLASH 749008 749056 48 0.0
RAM 67500 67500 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646732 1646828 96 0.0
RAM 211576 211576 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553500 1553580 80 0.0
RAM 208392 208392 0 0.0
light cy8ckit_062s2_43012 FLASH 1469428 1439252 -30176 -2.1
RAM 200368 197144 -3224 -1.6
lock cy8ckit_062s2_43012 FLASH 1467364 1467468 104 0.0
RAM 224704 224704 0 0.0
qpg lighting-app qpg6105+debug FLASH 662324 662372 48 0.0
RAM 105220 105220 0 0.0
lock-app qpg6105+debug FLASH 620112 620168 56 0.0
RAM 99664 99664 0 0.0
stm32 light STM32WB5MM-DK FLASH 482992 459768 -23224 -4.8
RAM 144688 141568 -3120 -2.2
telink bridge-app tl7218x FLASH 665214 665254 40 0.0
RAM 90828 90828 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621896 621936 40 0.0
RAM 31488 31488 0 0.0
light-app-ota-shell-factory-data tl3218x FLASH 770882 745446 -25436 -3.3
RAM 43568 40496 -3072 -7.1
tl7218x FLASH 779352 754002 -25350 -3.3
RAM 100752 97632 -3120 -3.1
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 680666 680706 40 0.0
RAM 52192 52192 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709228 709268 40 0.0
RAM 73400 73400 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 626174 600824 -25350 -4.0
RAM 142032 138912 -3120 -2.2
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 814004 788956 -25048 -3.1
RAM 99608 96488 -3120 -3.1
tizen all-clusters-app arm unknown 5104 5104 0 0.0
FLASH 1751644 1751932 288 0.0
RAM 93508 93516 8 0.0
chip-tool-ubsan arm unknown 11396 11396 0 0.0
FLASH 18683046 1868412 1080 0.0
RAM 8181084 8181540 456 0.0

@tersal tersal marked this pull request as ready for review February 12, 2025 22:54
@tersal tersal marked this pull request as draft February 13, 2025 16:08
@tersal tersal marked this pull request as ready for review February 13, 2025 20:23
@tersal tersal changed the title [WIP] Add ListNotifications on DataModelProvider Add ListNotifications on DataModelProvider Feb 17, 2025
Copy link

github-actions bot commented Feb 27, 2025

PR #37526: Size comparison from 78e5932 to f6d0f1c

Increases above 0.2%:

platform target config section 78e5932 f6d0f1c change % change
linux air-purifier-app debug unknown 4728 4752 24 0.5
RAM 111088 112304 1216 1.1
all-clusters-app debug unknown 5536 5560 24 0.4
RAM 514832 516016 1184 0.2
all-clusters-minimal-app debug unknown 5432 5456 24 0.4
RAM 221272 222488 1216 0.5
bridge-app debug unknown 5448 5472 24 0.4
RAM 200144 201344 1200 0.6
camera-app debug unknown 5432 5456 24 0.4
RAM 194592 195792 1200 0.6
chip-tool debug unknown 6096 6112 16 0.3
fabric-admin debug unknown 5784 5800 16 0.3
fabric-bridge-app debug unknown 4696 4720 24 0.5
RAM 187016 188168 1152 0.6
fabric-sync debug unknown 4952 4976 24 0.5
RAM 470400 471600 1200 0.3
lighting-app debug+rpc+ui unknown 6160 6184 24 0.4
RAM 203952 205168 1216 0.6
lock-app debug unknown 5400 5424 24 0.4
RAM 191144 192344 1200 0.6
ota-provider-app debug unknown 4736 4760 24 0.5
RAM 179832 181000 1168 0.6
ota-requestor-app debug unknown 4688 4712 24 0.5
RAM 184320 185488 1168 0.6
shell debug unknown 4216 4240 24 0.6
RAM 144344 145528 1184 0.8
thermostat-no-ble arm64 RAM 229016 229840 824 0.4
tv-app debug unknown 5728 5752 24 0.4
RAM 593832 595032 1200 0.2
tv-casting-app debug unknown 5304 5320 16 0.3
Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 78e5932 f6d0f1c change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1096892 1096830 -62 -0.0
RAM 94842 94842 0 0.0
bl702 lighting-app bl702+eth FLASH 651870 651804 -66 -0.0
RAM 33509 33509 0 0.0
bl702+wifi FLASH 829142 829076 -66 -0.0
RAM 22233 22233 0 0.0
bl706+mfd+rpc+littlefs FLASH 1061538 1061472 -66 -0.0
RAM 32157 32157 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 892382 892316 -66 -0.0
RAM 26896 26896 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 975278 975212 -66 -0.0
RAM 24644 24644 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 817152 817184 32 0.0
RAM 120272 120272 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 826072 826104 32 0.0
RAM 125368 125368 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 772956 772988 32 0.0
RAM 113740 113740 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 757240 757264 24 0.0
RAM 113948 113948 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 540646 540686 40 0.0
RAM 205128 205128 0 0.0
lock CC3235SF_LAUNCHXL FLASH 574794 574850 56 0.0
RAM 205376 205376 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 658861 658901 40 0.0
RAM 75412 75412 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 678713 678753 40 0.0
RAM 78052 78052 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 678713 678753 40 0.0
RAM 78052 78052 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 635645 635685 40 0.0
RAM 70480 70480 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 619101 619141 40 0.0
RAM 71652 71652 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 638737 638777 40 0.0
RAM 74196 74196 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 638737 638777 40 0.0
RAM 74196 74196 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 638589 638629 40 0.0
RAM 74660 74660 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 658305 658345 40 0.0
RAM 77204 77204 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 658305 658345 40 0.0
RAM 77204 77204 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 614937 614969 32 0.0
RAM 68748 68748 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 634789 634821 32 0.0
RAM 71388 71388 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 634789 634821 32 0.0
RAM 71388 71388 0 0.0
efr32 lock-app BRD4187C FLASH 939672 939712 40 0.0
RAM 159920 159920 0 0.0
BRD4338a FLASH 732656 732712 56 0.0
RAM 234828 234828 0 0.0
window-app BRD4187C FLASH 1032104 1032176 72 0.0
RAM 128024 128024 0 0.0
esp32 all-clusters-app c3devkit DRAM 98656 98656 0 0.0
FLASH 1589616 1589644 28 0.0
IRAM 83820 83820 0 0.0
m5stack DRAM 117436 117436 0 0.0
FLASH 1556626 1556686 60 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4728 4752 24 0.5
FLASH 2651111 2653439 2328 0.1
RAM 111088 112304 1216 1.1
all-clusters-app debug unknown 5536 5560 24 0.4
FLASH 5962884 5965212 2328 0.0
RAM 514832 516016 1184 0.2
all-clusters-minimal-app debug unknown 5432 5456 24 0.4
FLASH 5297596 5299924 2328 0.0
RAM 221272 222488 1216 0.5
bridge-app debug unknown 5448 5472 24 0.4
FLASH 4649944 4652272 2328 0.1
RAM 200144 201344 1200 0.6
camera-app debug unknown 5432 5456 24 0.4
FLASH 4673072 4675400 2328 0.0
RAM 194592 195792 1200 0.6
chip-tool debug unknown 6096 6112 16 0.3
FLASH 13303567 13305153 1586 0.0
RAM 603392 603456 64 0.0
chip-tool-ipv6only arm64 unknown 21976 21976 0 0.0
FLASH 11496552 11498072 1520 0.0
RAM 656112 656136 24 0.0
fabric-admin debug unknown 5784 5800 16 0.3
FLASH 11568361 11569947 1586 0.0
RAM 603176 603240 64 0.0
fabric-bridge-app debug unknown 4696 4720 24 0.5
FLASH 4453510 4455838 2328 0.1
RAM 187016 188168 1152 0.6
fabric-sync debug unknown 4952 4976 24 0.5
FLASH 5570501 5572821 2320 0.0
RAM 470400 471600 1200 0.3
lighting-app debug+rpc+ui unknown 6160 6184 24 0.4
FLASH 5516785 5519105 2320 0.0
RAM 203952 205168 1216 0.6
lock-app debug unknown 5400 5424 24 0.4
FLASH 4689760 4692090 2330 0.0
RAM 191144 192344 1200 0.6
ota-provider-app debug unknown 4736 4760 24 0.5
FLASH 4311972 4314300 2328 0.1
RAM 179832 181000 1168 0.6
ota-requestor-app debug unknown 4688 4712 24 0.5
FLASH 4442292 4444620 2328 0.1
RAM 184320 185488 1168 0.6
shell debug unknown 4216 4240 24 0.6
FLASH 2980028 2982364 2336 0.1
RAM 144344 145528 1184 0.8
thermostat-no-ble arm64 unknown 9448 9448 0 0.0
FLASH 4139576 4141848 2272 0.1
RAM 229016 229840 824 0.4
tv-app debug unknown 5728 5752 24 0.4
FLASH 5909349 5911669 2320 0.0
RAM 593832 595032 1200 0.2
tv-casting-app debug unknown 5304 5320 16 0.3
FLASH 11474045 11475645 1600 0.0
RAM 718656 718672 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 911760 911792 32 0.0
RAM 142859 142859 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 902608 902660 52 0.0
RAM 125195 125195 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 850424 850456 32 0.0
RAM 141271 141271 0 0.0
nxp contact k32w0+release FLASH 587368 587408 40 0.0
RAM 70980 70980 0 0.0
mcxw71+release FLASH 601192 601224 32 0.0
RAM 63096 63096 0 0.0
light k32w0+release FLASH 613100 613140 40 0.0
RAM 70268 70268 0 0.0
k32w1+release FLASH 685824 685856 32 0.0
RAM 48584 48584 0 0.0
lock mcxw71+release FLASH 750032 750064 32 0.0
RAM 67500 67500 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1655684 1655740 56 0.0
RAM 212264 212264 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1562380 1562436 56 0.0
RAM 208560 208560 0 0.0
light cy8ckit_062s2_43012 FLASH 1441180 1441236 56 0.0
RAM 197296 197296 0 0.0
lock cy8ckit_062s2_43012 FLASH 1470068 1470124 56 0.0
RAM 224960 224960 0 0.0
qpg lighting-app qpg6105+debug FLASH 663772 663804 32 0.0
RAM 105156 105156 0 0.0
lock-app qpg6105+debug FLASH 622240 622272 32 0.0
RAM 99768 99768 0 0.0
stm32 light STM32WB5MM-DK FLASH 459840 459872 32 0.0
RAM 141472 141472 0 0.0
telink bridge-app tl7218x FLASH 669192 669220 28 0.0
RAM 90752 90752 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 622078 622106 28 0.0
RAM 31488 31488 0 0.0
light-app-ota-shell-factory-data tl3218x FLASH 745386 745414 28 0.0
RAM 40396 40396 0 0.0
tl7218x FLASH 753948 753976 28 0.0
RAM 97540 97540 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 681018 681046 28 0.0
RAM 52192 52192 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709580 709608 28 0.0
RAM 73400 73400 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 600760 600788 28 0.0
RAM 138812 138812 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 788988 789016 28 0.0
RAM 96388 96388 0 0.0
tizen all-clusters-app arm unknown 5116 5116 0 0.0
FLASH 1766136 1766256 120 0.0
RAM 93844 93852 8 0.0
chip-tool-ubsan arm unknown 11492 11492 0 0.0
FLASH 18983958 18984798 840 0.0
RAM 8306328 8306648 320 0.0

@mergify mergify bot merged commit d829d90 into project-chip:master Feb 28, 2025
71 checks passed
@tersal tersal deleted the replace-aai-call-with-datamodel-provider branch February 28, 2025 15:59
andy31415 added a commit to andy31415/connectedhomeip that referenced this pull request Mar 3, 2025
    This defines a ServerClusterInterface class along with a registry.
    Also slight update to build_coverage to run on more (specifically my) machines without errors.

    Implementation notes:

    - Registry does NOT allow anymore to have "wildcard register" on endpoints. This is because we expect to have
      attribute members (no more "free/implicit" storage from ember buffers).
    - Interface now includes metadata for attributes (AAI does not) and maintains the cluster version.
    - This does not yet include changes in project-chip#37526 (so no AAI replacement for list begin/end) as that interface
      gets finalized. It will have it once that PR is finalized and merged.
    - Registry has no "cache" but uses a "move found item to front of list". This is ok for individual requests
      however for full iterations it would be slower (about 2x if we always iterate over all clusters ... since
      then average search would be N instead of N/2 for a list that never changes). We can revisit this approach at any time

    This is currently unused. I expect usages to add flash & RAM cost, that will be slowly offset (especially RAM) as
    we move clusters around:

    - RAM for linked list will be one list instead of 2 (AAI to CHI) so any cluster moved
      that uses both would save 1 pointer metadata will increase slightly, can be reduced
      if we get ember to stop generating metadata for included clusters
    - RAM can decrease by FeatureMap and ClusterRevision if we stop ember from allocating
      space for it (however we will offset this by flash "encode const value").
    - RAM usage increases slightly during conversion for "store version data" which ember currently
      allocates for all clusters.
    - Very long term: if we replace all clusters, we can drop AAI/CHI and that would save some flash.
      Still expect no savings because new interface does all of AAI and CHI and a bit more.

    TLDR on resourcing: probably ok on RAM over time, there is a flash overhead for this,
         claiming this is important for testable and maintainable code in the future.
gmarcosb pushed a commit to gmarcosb/connectedhomeip that referenced this pull request Mar 4, 2025
* Add ListNotifications on DataModelProvider

* Restyled by whitespace

* Restyled by clang-format

* Rename enum values and add more information in comments.

* Update src/app/data-model-provider/Provider.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Remove BitFlags from Provider

---------

Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
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.

Add List write start/end to DataModel::Provider and decouple IME from AAI/CHI Registries
4 participants