Skip to content

Add a fully functioning pure-Python event loop #53

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

Merged
merged 6 commits into from
Jan 17, 2025
Merged

Add a fully functioning pure-Python event loop #53

merged 6 commits into from
Jan 17, 2025

Conversation

almarklein
Copy link
Member

@almarklein almarklein commented Jan 15, 2025

I still had this code from the recent big refactorings.

I did a little benchmark, using a glfw window with a no-op draw function:

loop FPS
raw ±20k
asyncio ±10k
trio ±8k
qt ±19k

This shows that the overhead is smaller than other Python loops like Asyncio and Trio, which obviously need to do more work. Fun to see, but also meaningless; In practice I don't think this overhead will affect the fps of a real visualization.

@almarklein almarklein marked this pull request as draft January 15, 2025 20:50
@almarklein almarklein marked this pull request as ready for review January 16, 2025 14:54
@almarklein almarklein requested a review from Korijn January 16, 2025 14:55
@almarklein almarklein merged commit 5d73852 into main Jan 17, 2025
13 checks passed
@almarklein almarklein deleted the raw-loop branch January 17, 2025 08:25
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