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

topicsdb search optimization #336

Merged

Conversation

rus-alex
Copy link
Contributor

@rus-alex rus-alex commented Jul 1, 2022

New topicsdb/Index.searchParallel() instead of topicsdb/Index.searchLazy() is optimized for large datadir.
Gets ~4 times faster (39s vs 176s) on mainnet query

curl -X POST 'http://localhost:4000' -H 'Content-Type: application/json' -d '                                                                                                                          
{                                                                                                                                                                                                           
    "jsonrpc": "2.0",                                                                                                                                                                                       
    "method": "eth_getLogs",                                                                                                                                                                                
    "params": [{                                                                                                                                                                                            
"fromBlock": "0x256e898",                                                                                                                                                                                         
"toBlock": "0x2586f37",                                                                                                                                                                                     
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", null, "0x00000000000000000000000089716ad7edc3be3b35695789c475f3e7a3deb12a"]                                                
    }],                                                                                                                                                                                                     
    "id": 1                                                                                                                                                                                                 
}'

@rus-alex rus-alex requested review from hadv and uprendis July 10, 2022 13:27
@uprendis uprendis merged commit e07fd5c into Fantom-foundation:develop Jul 24, 2022
@rus-alex rus-alex mentioned this pull request Nov 5, 2022
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