In void Map::MapservAfter(uv_work_t *req) the mapserver output is currently copied from a Map::gdBuffer object to a new Node Buffer object using the following public constructor:
static Buffer* New(char *data, size_t len);
Efficiency gains can be made by having the Buffer take ownership of the existing buffer, removing the need for the copy, using the following public constructor:
Fixed in e87af97. A side effect is that memory allocated for mapserver output is now cleaned up during the V8 garbage collection cycle instead of at the end of each request as was previously the case.
In
void Map::MapservAfter(uv_work_t *req)
the mapserver output is currently copied from aMap::gdBuffer
object to a new NodeBuffer
object using the following public constructor:Efficiency gains can be made by having the
Buffer
take ownership of the existing buffer, removing the need for the copy, using the following public constructor:The
free_callback
would be a wrapper aroundmsFree()
.