question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Performance Optimizations

See original GitHub issue

What is wrong?

There is rudamentary full sync code in place and with that, we’re finding performance issues.

The link above is the cProfile output which can be loaded using the pstats standard library module to see where time is spent.

Known “low hanging fruit”

The following things are where we’re seeing the most time spent which can likely be optimized.

  • Remove support for python 2 from pyrlp
  • Further pyrlp optimizations
  • Caching of the VMState.prev_hashes generation.

Ways to make things faster

Cython looks to be a very promising way for us to do certain optimizations. We should spend a little time doing discovery to see how this well this works and what kind of performance gains we can get.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
gsalgadocommented, Apr 27, 2018

Fresh cProfile stats, now with all performance improvements and a much smaller DB (thanks to #600): block-import-stats.txt

TL;DR: trie seems to be our bottleneck now, together with some ChainDB methods, but some of the latter can probably be cached

2reactions
pipermerriamcommented, Apr 19, 2018

We may be talking about the same thing.

https://github.com/ethereum/py-evm/blob/master/evm/db/backends/base.py

I think this needs a new API: BaseDB.batch_set(...)

MemoryDB would implement this as a loop calling down to individual set calls. The LevelDB backend would use the batch APIs from plyvel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance Optimization - an overview | ScienceDirect Topics
Performance optimization, also known as “performance tuning”, is usually an iterative approach to making and then monitoring modifications to an application ...
Read more >
Performance Optimization in Software Development - Medium
Performance Optimization of a programs and software is the process modifying a software system to make it work more efficiently and execute more...
Read more >
Mastering Performance Optimization - The Basic Metrics And ...
Performance optimization is the process of modifying a system to amplify its functionality, thus making it more efficient and effective.
Read more >
6 Performance Optimization
The single most important aspect of performance optimization is knowing what to optimize. To improve the performance of your application, you must fully ......
Read more >
18 Tips for Website Performance Optimization - KeyCDN
Website performance optimization tips# · 1. Image optimization# · 2. Reduce HTTP requests# · 3. Minify CSS and JavaScript# · 4. Critical path...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found