Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP http_parser: don't reuse HTTPParser #24330

Closed
wants to merge 2 commits into from

Commits on Nov 13, 2018

  1. http_parser: don't reuse HTTPParser

    As discussed in nodejs/diagnostics#248 and
    nodejs#21313, reusing HTTPParser resource
    is a blocker for landing
    `require('async_hooks').currentAsyncResource()`, since reusing an async
    resource interanlly would make it infeasible to use them reliably in
    WeakMaps. Two suggestions came up: have a wrapper around the HTTPParser
    which we would use as the async resource, or stop reusing HTTPParser in
    our HTTP server/client code.
    
    This commit implements the latter, since we have a better GC now and
    reusing HTTPParser might make sense anymore. This also will avoid one
    extra JS->C++ call in some cases, which should improve performance for
    these cases.
    mmarchini committed Nov 13, 2018
    Configuration menu
    Copy the full SHA
    73e2db6 View commit details
    Browse the repository at this point in the history
  2. fixup! fix broken test

    mmarchini committed Nov 13, 2018
    Configuration menu
    Copy the full SHA
    5ad62cc View commit details
    Browse the repository at this point in the history