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: hardcoded trusted plugin during --help check #2347

Merged

Conversation

antazoey
Copy link
Member

What I did

when you have a trusted plugin installed, even if that plugin is also optimized like we did for the ones with core, it is still has a small slowdown because of the trusted check, which makes 1 request to GitHub during --help

this PR hardcoded the trusted plugin to avoid the request altogether.

How I did it

hardcode the trusted plugin

How to verify it

first install ape-tokens==0.8.1 (to get the full benefit, will still work on 0.8.0)

then

ape --help

Before i was seeing like 2.23 seconds..
Now I am seeing like 2 seconds

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@antazoey
Copy link
Member Author

Other work needed still get ape --help faster:

  1. make ape_vyper module load faster
  2. make ape_solidity module load faster
  3. make ape_ledger module load faster
  4. make ape_trezor module load faster

I think that is the remaining plugins.

fubuloubu
fubuloubu previously approved these changes Oct 26, 2024
@antazoey antazoey force-pushed the perf/trusted-plugins-check-use-hardcoded branch from 4c39453 to 14993f5 Compare October 26, 2024 23:46
@antazoey antazoey merged commit 4199cac into ApeWorX:main Oct 27, 2024
16 checks passed
@antazoey antazoey deleted the perf/trusted-plugins-check-use-hardcoded branch October 27, 2024 01:48
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