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
|
/// Creates a new default tokio multi-thread [Runtime](tokio::runtime::Runtime) with all features
|
||||||
/// enabled
|
/// enabled
|
||||||
pub fn tokio_runtime() -> Result<tokio::runtime::Runtime, std::io::Error> {
|
pub fn tokio_runtime() -> Result<tokio::runtime::Runtime, std::io::Error> {
|
||||||
tokio::runtime::Builder::new_multi_thread()
|
tokio::runtime::Builder::new_multi_thread().enable_all().build()
|
||||||
.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()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Runs the given future to completion or until a critical task panicked
|
/// 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
|
/// Uses [`rayon::ThreadPoolBuilder::build`](rayon::ThreadPoolBuilder::build) defaults but
|
||||||
/// increases the stack size to 8MB.
|
/// increases the stack size to 8MB.
|
||||||
pub fn build() -> Result<Self, rayon::ThreadPoolBuildError> {
|
pub fn build() -> Result<Self, rayon::ThreadPoolBuildError> {
|
||||||
Self::builder()
|
Self::builder().build().map(Self::new)
|
||||||
// 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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Asynchronous wrapper around Rayon's
|
/// Asynchronous wrapper around Rayon's
|
||||||
|
|||||||
Reference in New Issue
Block a user