This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Remove SlabAllocator#5720
Merged
trevnorris merged 3 commits intonodejs:masterfrom Jul 3, 2013
trevnorris:no-slaballocator
Merged
Remove SlabAllocator#5720trevnorris merged 3 commits intonodejs:masterfrom trevnorris:no-slaballocator
trevnorris merged 3 commits intonodejs:masterfrom
trevnorris:no-slaballocator
Conversation
Author
|
sometimes I hate you github! |
Author
|
The pr summary has been updated to reflect current changes. imo I'd like just these changes merged first. Mainly because there's no finish line of performance improvements it offers (as outlined in the summary above) and I don't want to go through another massive buffer-type pr scenario again. :) /cc @isaacs @bnoordhuis |
src/udp_wrap.cc
Outdated
Member
There was a problem hiding this comment.
Prefer braces around statement when it's spread over multiple lines.
Now that Buffer instantiation has improved, the SlabAllocator is an unnecessary layer of complexity preventing further performance optimizations. Currently there is a small performance loss with very small stream requests, but this will soon be addressed.
To use realloc the implementation had to be changed to use malloc/free.
The function arguments offset and length are now no longer used since all I/O requests now use discretely allocated memory.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removing the
SlabAllocatorwill allow for more aggressive performance enhancements.EDIT: I have removed a couple commits from the set that weren't directly related. While this does introduce a small performance regression for requests of small packet size, it seems
make benchis exasperating that discrepancy. If the benchmarks are run by hand (runningbenchmark/http_simple.jsand pointingwrkto the appropriate url) the performance difference is easily below 5%. And this is only for small (i.e. <= 1024 bytes) requests. This patch is a launchpad to several other changes. Some of which include:StreamWrapto remove any redundant object creation.StreamWrapCallbacks::DoReadcallbacks so objects (either buffers or external string resources) don't need to duplicate memory before being used.http_parser. Instead we accumulate until all headers have been received.