mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
perf: rm thread stack size bumps (#5089)
This commit is contained in:
@ -114,11 +114,7 @@ pub struct CliContext {
|
||||
/// Creates a new default tokio multi-thread [Runtime](tokio::runtime::Runtime) with all features
|
||||
/// enabled
|
||||
pub fn tokio_runtime() -> Result<tokio::runtime::Runtime, std::io::Error> {
|
||||
tokio::runtime::Builder::new_multi_thread()
|
||||
.enable_all()
|
||||
// increase stack size, mostly for RPC calls that use the evm: <https://github.com/paradigmxyz/reth/issues/3056> and <https://github.com/bluealloy/revm/issues/305>
|
||||
.thread_stack_size(8 * 1024 * 1024)
|
||||
.build()
|
||||
tokio::runtime::Builder::new_multi_thread().enable_all().build()
|
||||
}
|
||||
|
||||
/// Runs the given future to completion or until a critical task panicked
|
||||
|
||||
@ -71,11 +71,7 @@ impl BlockingTaskPool {
|
||||
/// Uses [`rayon::ThreadPoolBuilder::build`](rayon::ThreadPoolBuilder::build) defaults but
|
||||
/// increases the stack size to 8MB.
|
||||
pub fn build() -> Result<Self, rayon::ThreadPoolBuildError> {
|
||||
Self::builder()
|
||||
// increase stack size, mostly for RPC calls that use the evm: <https://github.com/paradigmxyz/reth/issues/3056> and <https://github.com/bluealloy/revm/issues/305>
|
||||
.stack_size(8 * 1024 * 1024)
|
||||
.build()
|
||||
.map(Self::new)
|
||||
Self::builder().build().map(Self::new)
|
||||
}
|
||||
|
||||
/// Asynchronous wrapper around Rayon's
|
||||
|
||||
Reference in New Issue
Block a user