Skip to content

Fix #74: Optimize ConflictDetector._checkAttendeeConflicts O(n*m) → O(n+m)#132

Merged
thedhanawada merged 1 commit intomasterfrom
fix/issue-74-attendee-conflicts-perf
Mar 20, 2026
Merged

Fix #74: Optimize ConflictDetector._checkAttendeeConflicts O(n*m) → O(n+m)#132
thedhanawada merged 1 commit intomasterfrom
fix/issue-74-attendee-conflicts-perf

Conversation

@thedhanawada
Copy link
Copy Markdown
Collaborator

Fix

Replaced nested for-loops with Set-based lookup in _checkAttendeeConflicts() (ConflictDetector.js:323-328).

Previously used O(n*m) nested loops to find overlapping attendees. For enterprise events with 50-100 attendees each, this meant 2500-10000 comparisons per event pair. Now uses a Set for O(1) email lookup, reducing overall complexity to O(n+m).

Files Changed

  • core/conflicts/ConflictDetector.js — 5 lines added, 10 removed

Fixes #74

Replaced nested for-loops comparing attendee emails with a Set-based
lookup. For enterprise events with 50+ attendees, this reduces
comparisons from O(n*m) to O(n+m).

Fixes #74
@thedhanawada thedhanawada merged commit f833673 into master Mar 20, 2026
6 checks passed
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.

ConflictDetector._checkAttendeeConflicts uses O(n*m) nested loop

1 participant