Limit the number of pooled objects

This commit is contained in:
Jarred Sumner
2022-02-01 20:47:35 -08:00
parent 170e58a99d
commit 213960a04a
12 changed files with 61 additions and 14 deletions

View File

@@ -463,8 +463,8 @@ pub const Fetch = struct {
reject: js.JSObjectRef = null,
context: FetchTaskletContext = undefined,
const Pool = ObjectPool(FetchTasklet, init, true);
const BodyPool = ObjectPool(MutableString, MutableString.init2048, true);
const Pool = ObjectPool(FetchTasklet, init, true, 32);
const BodyPool = ObjectPool(MutableString, MutableString.init2048, true, 8);
pub const FetchTaskletContext = struct {
tasklet: *FetchTasklet,
};