Skip to content

Commit 0d30fce

Browse files
committed
Added TODO on slow next iteration
1 parent f777c05 commit 0d30fce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,8 @@ DataModel::CommandEntry CodegenDataModelProvider::NextAcceptedCommand(const Conc
594594
CommandHandlerInterface * interface =
595595
CommandHandlerInterfaceRegistry::Instance().GetCommandHandler(before.mEndpointId, before.mClusterId);
596596

597+
// TODO: `Next` redirecting to a callback is slow O(n^2).
598+
// see https://github.com/project-chip/connectedhomeip/issues/35790
597599
if (interface != nullptr)
598600
{
599601
EnumeratorCommandFinder finder(EnumeratorCommandFinder::Operation::FindNext, before.mCommandId);
@@ -692,6 +694,8 @@ ConcreteCommandPath CodegenDataModelProvider::NextGeneratedCommand(const Concret
692694
CommandHandlerInterface * interface =
693695
CommandHandlerInterfaceRegistry::Instance().GetCommandHandler(before.mEndpointId, before.mClusterId);
694696

697+
// TODO: `Next` redirecting to a callback is slow O(n^2).
698+
// see https://github.com/project-chip/connectedhomeip/issues/35790
695699
if (interface != nullptr)
696700
{
697701
EnumeratorCommandFinder finder(EnumeratorCommandFinder::Operation::FindNext, before.mCommandId);

0 commit comments

Comments
 (0)