Skip to content

Optimize BPMN start message lookups#458

Closed
jbirddog wants to merge 1 commit intomainfrom
message_start
Closed

Optimize BPMN start message lookups#458
jbirddog wants to merge 1 commit intomainfrom
message_start

Conversation

@jbirddog
Copy link
Copy Markdown
Contributor

Refactor ProcessParser.start_messages() to build a message-id lookup table once instead of rescanning all BPMN message nodes for each message start event.

This preserves the existing behavior while reducing the lookup path from O(m*n) to O(m+n), where m is the number of messages and n is the number of message start events. Add a focused regression test that counts id lookups so the improvement is verified without relying on noisy timing assertions.

Refactor ProcessParser.start_messages() to build a message-id lookup table once instead of rescanning all BPMN message nodes for each message start event.

This preserves the existing behavior while reducing the lookup path from O(m*n) to O(m+n), where m is the number of messages and n is the number of message start events. Add a focused regression test that counts id lookups so the improvement is verified without relying on noisy timing assertions.
@jbirddog
Copy link
Copy Markdown
Contributor Author

This work is included in the larger parser optimization pr.

@jbirddog jbirddog closed this Apr 24, 2026
@jbirddog jbirddog deleted the message_start branch April 27, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant