Allow choosing an allocation strategy in controllers #31

Closed
opened 2022-10-15 07:17:01 +00:00 by heartles · 1 comment
Owner

Right now, ApiConn is hard coded to use an arena allocator and base controller data is allocated using the base allocator. This works fine for short-lived endpoints. However, in longer lasting endpoints like a streaming endpoint, the arena allocator may cause the endpoint to slowly consume more and more memory.

Instead, we should have the allocation strategy decided by the endpoint, and the controller helper then is responsible for creating an arena allocator as necessary. The API connection then just uses the allocator it is passed in.

I expect that most calls will be best served by the arena allocator, but doing so by default may be confusing, so arena-based allocation should be opt-in.

Right now, ApiConn is hard coded to use an arena allocator and base controller data is allocated using the base allocator. This works fine for short-lived endpoints. However, in longer lasting endpoints like a streaming endpoint, the arena allocator may cause the endpoint to slowly consume more and more memory. Instead, we should have the allocation strategy decided by the endpoint, and the controller helper then is responsible for creating an arena allocator as necessary. The API connection then just uses the allocator it is passed in. I expect that most calls will be best served by the arena allocator, but doing so by default may be confusing, so arena-based allocation should be opt-in.
heartles added the
backend
label 2022-10-15 07:17:01 +00:00
heartles added this to the v0.0.2 milestone 2022-10-15 07:17:06 +00:00
heartles modified the milestone from v0.0.2 to v0.0.3 2022-11-14 07:16:09 +00:00
Author
Owner

Closed in e1c0d29

Closed in e1c0d29
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: heartles/fediglam#31
No description provided.