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: remove unused ASTNode parsing #130

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Jan 5, 2024

What I did

fixes: #ApeWorX/ape#1726

How I did it

  • Del ASTNode logic for now as there are no tracing features yet in solidity so this does not affect anything and it was too pre-emptive to add anyway. I would like to get tracing features working and somehing like this is a first step, but the performance concerns leads me to think are going to probably want the raw dicts in the manifest instead and parse them later so compiling alone does not take forever, but will probably adjust ape-vyper like that first.

How to verify it

With this PR:

(ape310) ➜  ape-playground git:(repro1726) ✗ time ape compile -f
INFO: Compiling 'token.sol'.
INFO: Compiling 'Lib.sol'.
INFO (ape-solidity): Compiling using Solidity compiler '0.8.23+commit.f704f362'.
ape compile -f  4.63s user 0.76s system 122% cpu 4.391 total

Without this PR:

(ape310) ➜  ape-playground git:(repro1726) ✗ time ape compile -f
INFO: Compiling 'token.sol'.
INFO: Compiling 'Lib.sol'.
INFO (ape-solidity): Compiling using Solidity compiler '0.8.23+commit.f704f362'.
ape compile -f  33.43s user 0.84s system 102% cpu 33.307 total

4.63 seconds with PR, 33.43 w

That is 86.8% increase!

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@antazoey antazoey changed the title chore: mdformat and double log perf: remove unused ASTNode parsing Jan 5, 2024
fubuloubu
fubuloubu previously approved these changes Jan 5, 2024
fubuloubu
fubuloubu previously approved these changes Jan 5, 2024
tests/test_compiler.py Outdated Show resolved Hide resolved
@antazoey antazoey force-pushed the perf/del-unused-astnode-logic branch from b55bfd5 to b96dc47 Compare January 5, 2024 21:13
@antazoey
Copy link
Member Author

antazoey commented Jan 5, 2024

I couldn't get the regression testing portion figured out... It is stupidly complicated I guess and I can't really find a decent example.

For now will have to rely on looking at the output from past CI runs...

@antazoey antazoey merged commit 03aafed into ApeWorX:main Jan 5, 2024
13 checks passed
@antazoey antazoey deleted the perf/del-unused-astnode-logic branch January 5, 2024 22:53
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