-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 support for using CommandHandlerInterface for accepted/generated command listing #35753
Merged
mergify
merged 23 commits into
project-chip:master
from
andy31415:allow_chi_callback_on_cmds
Sep 26, 2024
Merged
Add support for using CommandHandlerInterface for accepted/generated command listing #35753
mergify
merged 23 commits into
project-chip:master
from
andy31415:allow_chi_callback_on_cmds
Sep 26, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…commands. Note that iteration is still O(N^2) which is not ideal, however at least the use of this is infrequent and list of commands is somewhat short.
Review changes with SemanticDiff. |
pullapprove
bot
requested review from
andyg-apple,
anush-apple,
arkq,
axelnxp,
bauerschwan,
bzbarsky-apple,
carol-apple,
cecille,
chapongatien,
chrisdecenzo,
chshu,
chulspro,
cliffamzn,
Damian-Nordic,
dhrishi,
doru91,
fessehaeve,
harimau-qirex,
harsha-rajendran,
hawk248,
hicklin,
jepenven-silabs,
jmartinez-silabs,
jmeg-sfy,
joonhaengHeo,
jtov-sfy and
jtung-apple
September 24, 2024 19:05
PR #35753: Size comparison from e8554de to 7ee6374 Full report (45 builds for cyw30739, efr32, esp32, linux, nxp, psoc6, stm32)
|
PR #35753: Size comparison from 648f088 to 0d30fce Full report (22 builds for cc13x4_26x4, cc32xx, nrfconnect, nxp, qpg, stm32, tizen)
|
PR #35753: Size comparison from 648f088 to a9ac014 Full report (51 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, linux, nrfconnect, nxp, psoc6, qpg, stm32, tizen)
|
PR #35753: Size comparison from 648f088 to 1629728 Full report (49 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, nrfconnect, nxp, psoc6, qpg, stm32, tizen)
|
PR #35753: Size comparison from 648f088 to e6f61d8 Full report (88 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
bzbarsky-apple
approved these changes
Sep 26, 2024
src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Boris Zbarsky <[email protected]>
tcarmelveilleux
approved these changes
Sep 26, 2024
PR #35753: Size comparison from 648f088 to d1fcf04 Full report (88 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
yyzhong-g
pushed a commit
to yyzhong-g/connectedhomeip
that referenced
this pull request
Dec 12, 2024
…command listing (project-chip#35753) * Add support for using CommandHandlerInterface for accepted/generated commands. Note that iteration is still O(N^2) which is not ideal, however at least the use of this is infrequent and list of commands is somewhat short. * Fix includes * Comment update * Comment update * Fix includes * comments * Restyled by clang-format * Update src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp Co-authored-by: Terence Hampson <[email protected]> * Make use of FindExact operation * Use CommandEntryFrom * Fix naming * Added TODO on slow next iteration * Update code flow to hopefully make it somewhat easier to read * Remove extra include * Make code even more readable I hope * Comment update * Fix includes * Restyled by clang-format * Update src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Restyled by clang-format --------- Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: Terence Hampson <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes sure that
DataModel::Provider
respects the command handler interfaceGeneratedCommands
andAcceptedCommands
if we need to iterate over them.This has some deficits:
O(N^2)
becuase it converts a callback-based system into an iterator one. [DM::Provider] usage of CommandHandlerInterface::Enumerate* methods is inefficient for iterator-style operations #35790 created for this.For now this seems sufficient as actual iteration should be infrequent and existing CHI is still coupled with ember metadata, however at some point we should consider speed up logic (e.g. some form of caching or converting CHI to use iterators rather than callbacks). We should also make CHI (or whatever replacement) actually support the full flag range instead of just a list iterator.
Changes