Skip to content

Zero-copy mapcache output when creating response `Buffer` #3

Open
homme opened this Issue Mar 20, 2013 · 2 comments

1 participant

@homme
GeoData Institute member
homme commented Mar 20, 2013

This is analagous to geo-data/node-mapserv#5 with the difference that the free_callback would wrap apr_pool_destroy() in void MapCache::GetRequestAfter(uv_work_t *req).

Also, when calling apr_pool_create() in Handle<Value> MapCache::GetAsync(const Arguments& args) the pool should probably be created from MapCache::global_pool instead of cache->config->pool as the latter is destroyed when a MapCache instance is garbage collected: this could conceivably happen before the Buffer object is collected.

@homme homme added a commit that referenced this issue Mar 21, 2013
@homme homme Zero-copy mapcache output when creating response `Buffer`
This fixes issue #3 with benchmarks showing a slight performance
boost.  A side effect is that the memory pool allocated for the
mapcache response is now cleaned up during the V8 garbage collection
cycle instead of at the end of each request as was previously the
case.
7077bd8
@homme
GeoData Institute member
homme commented Mar 21, 2013

Fixed in 7077bd8. A side effect is that the memory pool allocated for the mapcache response is now cleaned up during the V8 garbage collection cycle instead of at the end of each request as was previously the case.

@homme homme closed this Mar 21, 2013
@homme
GeoData Institute member
homme commented May 9, 2013

7077bd8 passed local tests but failed on Travis-CI so was reverted: further investigation required...

@homme homme reopened this May 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.