Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node-v0.x-archive
base: 6359e017ac76
Choose a base ref
...
head repository: nodejs/node-v0.x-archive
compare: 3398cce19340
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jul 31, 2013

  1. http: improve chunked res.write(buf) performance

    Avoid a costly buffer-to-string operation. Instead, allocate a new
    buffer, copy the chunk header and data into it and send that.
    
    The speed difference is negligible on small payloads but it really
    shines with larger (10+ kB) chunks. benchmark/http/end-vs-write-end
    with 64 kB chunks gives 45-50% higher throughput. With 1 MB chunks,
    the difference is a staggering 590%.
    
    Of course, YMMV will vary with real workloads and networks but this
    commit should have a positive impact on CPU and memory consumption.
    
    Big kudos to Wyatt Preul (@wpreul) for reporting the issue and providing
    the initial patch.
    
    Fixes #5941 and #5944.
    bnoordhuis committed Jul 31, 2013
    3
    Copy the full SHA
    3398cce View commit details
    Browse the repository at this point in the history