Skip to content

Less Mallocs #31

@Lol3rrr

Description

@Lol3rrr

Problem

Right now the code makes too much calls to malloc for my taste and it really slows down everything.

Solution

All the stuff for parsing the Request should be done on the one malloced array, that actually holds the request.
All the Headers then just simply hold a pointer to some value inside that block and how long it is supposed to be, this could really reduce the amount of malloc calls.
This also needs the headers to be aware of the fact that they only sometimes need to free their content and otherwise don't, this could be achieved using a simple boolean being passed to them on creation that indicates this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions