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

Performance improvements experiment #397

Closed
wants to merge 7 commits into from
Closed

Conversation

cgewecke
Copy link
Member

@cgewecke cgewecke commented Sep 13, 2019

This PR was an attempt to address an unexpected performance slowdown relative to 0.6.x (which sync writes each instrumentation event to file at the vm and should be much slower than an in-memory approach).

Tried:

  • using memdown as provider db (per suggestion at ganache-core 481 (in-memory db writes)
  • using ganache.server instead of ganache.provider (maybe web3 treats those differently?)
  • simplifying step handler logic slightly (since it might run millions of times)
  • ganache 6.4.1 through 6.7.0
  • --max-old-space-size=4096 in combination with memdown

There's some (inconclusive) variance run-to-run but overall it seems that in-process is just slower than stand-alone.

Benchmarking was vs. zeppelin in these workflows. Results ranged from 30 - 100% slowdown relative to a non-coverage test run using a separately launched client.

Each run compared three jobs (~2200 unit tests) (from fast to slow):

  • test (stand-alone - typically 8.5 min )
  • test_inprocess (e.g no coverage, using provider ~10 min)
  • coverage (coverage, using provider, ~12 min)

Closing for now....

@codecov-io
Copy link

codecov-io commented Sep 13, 2019

Codecov Report

❗ No coverage uploaded for pull request base (truffle-plugin@c8870a0). Click here to learn what that means.
The diff coverage is 92.85%.

Impacted file tree graph

@@                Coverage Diff                @@
##             truffle-plugin     #397   +/-   ##
=================================================
  Coverage                  ?   92.36%           
=================================================
  Files                     ?       10           
  Lines                     ?      550           
  Branches                  ?        0           
=================================================
  Hits                      ?      508           
  Misses                    ?       42           
  Partials                  ?        0
Impacted Files Coverage Δ
lib/collector.js 100% <100%> (ø)
lib/app.js 90.84% <90%> (ø)
dist/truffle.plugin.js 85% <90%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8870a0...715f019. Read the comment docs.

@cgewecke
Copy link
Member Author

See PR description above...

@cgewecke cgewecke closed this Sep 13, 2019
@cgewecke cgewecke changed the title Use memdown / simplify step handler Performance improvements experiment Sep 13, 2019
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