Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Performance Improvements Strategy & Tracking Issue #64

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

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants