Skip to content

add __slots__ and improved performance using lower level asyncio.Future instead of asyncio.Event and typehint the library#29

Open
Vizonex wants to merge 1 commit intoJoshuaalbert:mainfrom
Vizonex:improved-performance
Open

add __slots__ and improved performance using lower level asyncio.Future instead of asyncio.Event and typehint the library#29
Vizonex wants to merge 1 commit intoJoshuaalbert:mainfrom
Vizonex:improved-performance

Conversation

@Vizonex
Copy link

@Vizonex Vizonex commented Aug 30, 2025

I saw this library and knew it had potential with some of my upcoming python libraries I have planned. Kind of surprised it's not getting the attention and love that it really deserves so I added a few performance improvements for some internal refactoring.

  • I got rid of asyncio.Event in trade for asyncio.Future and I added in _loop for creating these objects as a speedboost.
  • added __slots__ to class attributes to impove speed and strictness of the class since really I don't people should subclass but feel free to prove me wrong with that one.
  • fixed pytest module since the last test triggers a warning popup that I got rid of for you.
  • Last but not least as the cherry on top, I made sure that the library was typehinted and added py.typed so that contributors to typeshead will ignore this burden. (and I tested it with mypy to ensure it's safety elsewhere).
  • Made sure 3.9 would still be supported up until it hits End Of Life

…e instead of asyncio.Event and typehint the library
@Vizonex Vizonex changed the title add __slots__ and improve performance using lower level asyncio.Future instead of asyncio.Event and typehint the library add __slots__ and improve performanced using lower level asyncio.Future instead of asyncio.Event and typehint the library Aug 30, 2025
@Vizonex Vizonex changed the title add __slots__ and improve performanced using lower level asyncio.Future instead of asyncio.Event and typehint the library add __slots__ and improved performance using lower level asyncio.Future instead of asyncio.Event and typehint the library Aug 30, 2025
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