Summary
PR #629 adds operation maps to invocation plugin hooks. However, durable_execution() calls the invocation hooks even when no plugins are installed, so PluginExecutor([]) still invokes the operations provider at both invocation start and invocation end.
Each invocation copies the full operation map twice per hook: ExecutionState.operations already returns a copy, and _snapshot_operation_infos() copies it again with dict(...). Users without plugins should not pay this operation-count-dependent cost.
Expected behavior
When the plugin executor has no plugins:
- Do not retain or invoke the operations provider.
- Return empty plugin-facing operation maps without snapshotting execution state.
- Preserve the current snapshot and lazy-conversion behavior when plugins are installed.
Suggested change
Gate provider retention and operation-map snapshotting on self._plugins, returning empty maps when the plugin list is empty.
Acceptance criteria
PluginExecutor([]) does not call the operations provider from either the invocation-start or invocation-end hook.
- Invocation hooks with installed plugins continue to expose the correct operation snapshots.
- Unit tests cover the empty-plugin case.
Source: #629 (comment)
Summary
PR #629 adds operation maps to invocation plugin hooks. However,
durable_execution()calls the invocation hooks even when no plugins are installed, soPluginExecutor([])still invokes the operations provider at both invocation start and invocation end.Each invocation copies the full operation map twice per hook:
ExecutionState.operationsalready returns a copy, and_snapshot_operation_infos()copies it again withdict(...). Users without plugins should not pay this operation-count-dependent cost.Expected behavior
When the plugin executor has no plugins:
Suggested change
Gate provider retention and operation-map snapshotting on
self._plugins, returning empty maps when the plugin list is empty.Acceptance criteria
PluginExecutor([])does not call the operations provider from either the invocation-start or invocation-end hook.Source: #629 (comment)