mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-09 02:10:10 +08:00
Change common ByteArrayPool to 128 * 4096
This commit is contained in:
parent
419f373189
commit
1f5493ba97
@ -14,11 +14,11 @@ import io.ktor.utils.io.pool.*
|
||||
/**
|
||||
* 缓存 [ByteArray] 实例的 [ObjectPool]
|
||||
*/
|
||||
public object ByteArrayPool : DefaultPool<ByteArray>(256) {
|
||||
public object ByteArrayPool : DefaultPool<ByteArray>(128) {
|
||||
/**
|
||||
* 每一个 [ByteArray] 的大小
|
||||
*/
|
||||
public const val BUFFER_SIZE: Int = 8192 * 8
|
||||
public const val BUFFER_SIZE: Int = 4096
|
||||
|
||||
override fun produceInstance(): ByteArray = ByteArray(BUFFER_SIZE)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user