Skip to content
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

submaster: refactor FrequencyTracker to use EMA for simpler and faster frequency calculation #34107

Closed

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Nov 25, 2024

This update refactors the FrequencyTracker class to enhance its performance and responsiveness by replacing the sum-based frequency calculation with an Exponential Moving Average (EMA). This change significantly improves real-time adaptability and makes the system more efficient in handling dynamic event rates.

Changes:

  • EMA-Based Frequency Calculation: Replaces the traditional sum approach with EMA to track frequency. This makes the calculation more efficient and eliminates unnecessary data management.
  • Real-Time Responsiveness: The EMA approach allows the class to quickly adjust to real-time changes in event frequency, making the system highly responsive in dynamic environments.
  • Less Memory Overhead: By no longer needing to store and sum large historical data, the memory footprint is reduced.
  • Improved Performance: The EMA approach avoids the overhead of summing and deque operations, enhancing performance.

@deanlee deanlee force-pushed the submaster_EMA_FrequencyTracker branch from 7bde348 to ac70289 Compare November 25, 2024 21:07
@deanlee deanlee closed this Nov 26, 2024
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