ethereumjs / organization

A repo for discussions and other non-code organizing stuff
https://ethereumjs.readthedocs.io
12 stars 17 forks source link

Performance Improvements Strategy & Tracking Issue #64

Open holgerd77 opened 4 years ago

holgerd77 commented 4 years ago

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  https://github.com/ethereumjs/ethereumjs-vm/issues/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:

Benchmarks / Tooling

Performance Measurement Setups

Helpful setups for performance analysis:

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 commented 4 years ago

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.