Juliasunn / video-web

Website for publishing and watching videos, etc...
0 stars 0 forks source link

Improve perfomance: #18

Open Juliasunn opened 3 months ago

Juliasunn commented 3 months ago

The directions that affect server perfomanct are:

Heap memory allocations are time-expensive and lead to fragmentstion Solutions:

What is allocated on heap? Everything that is constructed using std::make shared/unique/etc ... (Handlers, )

Juliasunn commented 3 months ago

Create an Allocator class for allocating memory for buffers in ObjectPool:

- multipart/form-data  buffer (body is char *)
-  LoadMediaHandler: response<http::string_body> buffer (body is std::string)

Example of ObjectPool implementation: https://gist.github.com/Gerold103/0199ac4c2facc2b34ef25f8ea44a0601