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 Strategy & Tracking Issue #64

Open
holgerd77 opened this issue Aug 25, 2020 · 1 comment
Open

Performance Improvements Strategy & Tracking Issue #64

holgerd77 opened this issue Aug 25, 2020 · 1 comment

Comments

@holgerd77
Copy link
Member

holgerd77 commented Aug 25, 2020

This issue is to keep track of the ongoing activities around improving the performance of the various EthereumJS libraries - especially the VM - and serve as a general entry point to the topic.

Focus

Improvement Targets

The following library parts are especially suited for performance improvement work (feel free to add):

Library Improvement Ideas Tracking Issue
VM Execution, Cache Improvements (StateManager), Stack & Memory Management, Precompiles  ethereumjs/ethereumjs-monorepo#865
Merkle Patricia Tree Checkpointing, Storage Backend, Tree Search, Cache Improvements (Tree Search, Storage) https://github.com/ethereumjs/merkle-patricia-tree/issues/132
Ethash Overall Execution
Util Hashing, Signatures
RLP  Encoding / decoding, highly used in e.g. MPT

Improvement Areas

Possible improvements areas:

  • Algorithmic Improvements on performance sensitive code parts (iteration strategy, data structures,...)
  • More sophisticated caching
    • Cache Structure & Setup (what to store? how long to store? where to store?)
    • Cache Application (when to use? when to flush?)
  • Storage Backends
  • Build Improvements (build target, dependencies, compiler flags,...)
  • Environment & Language (WASM)

Benchmarks / Tooling

Performance Measurement Setups

Helpful setups for performance analysis:

  • Dedicated benchmarking tool
  • CI Runs
  • Behaviour (optimally on reproducible tasks) in a productive environment (e.g. the VM within Buidler)

Benchmark Tooling

Helpful JavaScript/CI Tooling:

Progress Tracking

It would be nice if we collect some comprehensive results on progress being made over time here.

Note: this can be challenging if the benchmarking suite evolves/changes significantly over time. We'll see.

@s1na
Copy link
Contributor

s1na commented Aug 25, 2020

Great initiative!

On the VM side, I'd like to add investigating the performance penalty of the AsyncEventEmitter, I think it's draining a lot of time. Something else we discussed was how MPT doesn't clear the db nodes after the trie changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants