Skip to content

Use bump allocator for DB mutations #1330

Description

@Jake-Shadle

Right now we are using the global heap for building the SQL queries for mutations, but this is extremely wasteful since it's all strings that only need to last until they are executed before being dropped. I've mitigated this somewhat by presizing strings in most cases, but not all, a much better solution is to just use a bump allocator (eg. bumpalo) for the whole receive request -> deserialize -> build SQL queries -> execute -> send response chain as a majority of the heap allocations involved in that process are dropped immediately, and are not data that has any special Drop behavior.

This is definitely not needed right now, but wanted to write down this idea so I don't forget.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions