Skip to content

core/txpool: Optimize locks in LegacyPool#32927

Closed
KyrinCode wants to merge 3 commits intoethereum:masterfrom
KyrinCode:fix-locks-in-txpool
Closed

core/txpool: Optimize locks in LegacyPool#32927
KyrinCode wants to merge 3 commits intoethereum:masterfrom
KyrinCode:fix-locks-in-txpool

Conversation

@KyrinCode
Copy link
Copy Markdown
Contributor

When debugging with OP-Stack, I found that the RWLock has severe impact on performance of packing txs during stress test, especially when there are over 400,000+ txs in the txpool. It seems these two functions just need a read lock.

  • Content()
  • Pending()

Changed locking mechanism in Content method to use RLock for read operations.
@rjl493456442
Copy link
Copy Markdown
Member

Duplicated with #32924

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