Skip to content

Very long compile time [APE-1588] #102

@salparadi

Description

@salparadi

Environment information

  • ape and plugin versions:
$ ape --version
0.6.26

$ 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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions