ApeWorX / ape-vyper

Vyper compiler plugin for the Ape Framework, using VVM
https://www.apeworx.io/
Apache License 2.0
24 stars 9 forks source link

Very long compile time [APE-1588] #102

Open salparadi opened 7 months ago

salparadi commented 7 months ago

Environment information

$ ape plugins list Core Plugins accounts cache compile console ethereum geth init networks plugins pm run test Installed Plugins etherscan 0.6.10 foundry 0.6.19 ganache 0.6.9 infura 0.6.5 tokens 0.6.2 vyper 0.6.13



- Python Version: 3.10.13
- Vyper Version: 0.3.9
- OS: macOS

### What went wrong?

New Ape user, moving from brownie. I had a Vyper contract I had previously deployed using Brownie that I wanted to update/enhance. I copied it into `/contracts/` and ran `ape compile`. It took nearly 90 minutes for it to compile after I left it running. I have tried other contracts and they compile fine. This specific contract is roughly 1000 lines. Fair number of if/else conditionals, converts and slices. Main use case is a fallback function that accepts packed calldata directly which then gets sliced up and manipulated.

Per Discord discussion I tried manually compiling using Vyper like so:

`vyper contracts/filename.vy` took ~ 5 seconds
`/Users/xxx/.vvm/vyper-0.3.9 contracts/filename.vy` took ~ 5 seconds

So the contract compiles fine using vyper or the .vvm binary, but not using `ape compile`.

### How can it be fixed?

No idea :)