mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
Limit the number of pooled objects
This commit is contained in:
@@ -958,6 +958,7 @@ pub const ZigConsoleClient = struct {
|
||||
}
|
||||
}.init,
|
||||
true,
|
||||
16,
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -784,7 +784,7 @@ pub const DescribeScope = struct {
|
||||
this.tests.deinit(getAllocator(ctx));
|
||||
}
|
||||
|
||||
const ScopeStack = ObjectPool(std.ArrayListUnmanaged(*DescribeScope), null, true);
|
||||
const ScopeStack = ObjectPool(std.ArrayListUnmanaged(*DescribeScope), null, true, 16);
|
||||
|
||||
// pub fn runBeforeAll(this: *DescribeScope, ctx: js.JSContextRef, exception: js.ExceptionRef) bool {
|
||||
// var scopes = ScopeStack.get(default_allocator);
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user