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

perf: avoid all default web3 middleware #2488

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Jan 31, 2025

What I did

You can avoid all the middleware completely from web3 if you do middleware=[] at the initialization sequence.

I didn't really see much of a performance gain btw

How I did it

middleware=[] at the initialization sequence

How to verify it

[x for x in web3.middleware_onion] is empty now, isn't before.

Checklist

  • All changes are completed
  • Change is covered in tests
  • Documentation is complete

@antazoey antazoey marked this pull request as ready for review January 31, 2025 17:03
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