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

Speed up batching of events in evaluator #9736

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

xjules
Copy link
Contributor

@xjules xjules commented Jan 14, 2025

Issue
It seems that asyncio wait_for used in evaluator is "slow" in performance when dealing with O(100K) events in the event queue. Therefore the suggestion is to replace it with direct fetching (via get_nowait()) and instead just sleep whenever the event queue is empty.

Approach
Short description of the approach

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@xjules xjules self-assigned this Jan 14, 2025
asyncio wait_for used in evaluator is "slow" in performance when dealing with O(100K) events in the event queue.
Therefore the suggestion is to replace it with direct fetching (via get_nowait())
and instead just sleep whenever the event queue is empty.

Co-authored-by: Lars Evje <[email protected]>
Copy link

codspeed-hq bot commented Jan 14, 2025

CodSpeed Performance Report

Merging #9736 will not alter performance

Comparing xjules:fix_ee (09de232) with main (60fc8f8)

Summary

✅ 24 untouched benchmarks

Copy link
Contributor

@jonathan-eq jonathan-eq left a comment

Choose a reason for hiding this comment

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

Very good! 🦆

@xjules xjules merged commit c43f97f into equinor:main Jan 14, 2025
36 checks passed
@xjules xjules deleted the fix_ee branch January 14, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants