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

Simplify the collection of daily HSI events for mode 1 #1586

Merged
merged 4 commits into from
Feb 12, 2025

Conversation

tamuri
Copy link
Collaborator

@tamuri tamuri commented Feb 12, 2025

  • Collecting index of alive individuals repeatedly allocates memory and becomes slower than querying directly (esp. on large populations)
  • In mode 1, HSI events have the same priority so queue is effectively ordered by date. Stop processing when we reach the events from the next day
  • If health system is running in mode 1, then always ignore priority setting (all events get priority 0)
  • If we switch from mode 1 to mode 2, update every HSI event in the queue with enforced priority

- collecting index of alive individuals repeatedly allocates memory and becomes slower than querying directly (esp. on large populations)
- in mode 1, HSI events have the same priority so queue is effectively ordered by date. Stop processing when we reach the events from the next day
Copy link
Collaborator

@marghe-molaro marghe-molaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

@tamuri tamuri merged commit 4c46ae2 into master Feb 12, 2025
62 checks passed
@tamuri tamuri deleted the tamuri/hs-get_events_due_today branch February 12, 2025 16:55
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.

2 participants