LimeChain / matchstick

🔥 Unit testing framework for Subgraph development on The Graph protocol. ⚙️
MIT License
207 stars 17 forks source link

Matchstick performance #359

Closed stevedefazio closed 2 years ago

stevedefazio commented 2 years ago

Matchstick ran with pretty snappy performance when I was running it in its own container like so every time: docker run -it --rm --mount type=bind,source=C:\Users\Family\projects\subgraph-monorepo\subgraphs\internal-dashboard,target=/matchstick matchstick

But now that I've put my whole development environment into a container, and just run it with npm run test, it's very slow. Between ">graph test" and "Skipping download" is about 5-8 seconds.

dashboard@1.0.0 test graph test

Skipping download/install step because binary already exists at /workspaces/subgraph-monorepo/node_modules/binary-install-raw/bin/0.5.1

Other things like npm seem to run in normal amounts of time. So I wanted to ask and see if there was any kind of configuration with matchstick that I could change to make it run faster.

dimitrovmaksim commented 2 years ago

Yeah, running like that seems slower (and actually in my case it throws an error after the Skipping download... message), maybe it's related to docker. Installing graph-cli globally inside the container npm install -g @graphprotocol/graph-cli and running graph test directly seems way faster and does not throw an error in my case.

stevedefazio commented 2 years ago

graph test was faster for sure! Thank you